Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - Return permission denied rather than server error upon attempted PUT on ro-fs #1062

Open
Ostheer opened this issue Feb 10, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Ostheer
Copy link

Ostheer commented Feb 10, 2025

Describe the solution you'd like
Some of my buckets are mounted read-only.
When a user tries to PUT something there, they receive an internal server error.
It would be nice if they got some sort of Permission Denied error instead.

Server log when I try it now:

2025/02/10 16:56:06 Internal Error, open temp file: make temp dir: mkdir bucketname/.sgwtmp: read-only file system
16:56:06 | 500 |     131.086µs | 172.17.0.1 | PUT | /bucketname/raw/project1/file3 | - |
16:56:23 | 500 |     171.091µs | 172.17.0.1 | PUT | /bucketname/raw/project1/file3 | - |
@Ostheer Ostheer added the enhancement New feature or request label Feb 10, 2025
@benmcclelland
Copy link
Member

Maybe this error would be more appropriate in this case?

	ErrMethodNotAllowed: {
		Code:           "MethodNotAllowed",
		Description:    "The specified method is not allowed against this resource.",
		HTTPStatusCode: http.StatusMethodNotAllowed,
	},

@Ostheer
Copy link
Author

Ostheer commented Feb 10, 2025

Yes, that seems to cover it quite well!
I suppose the same message can be used for other attempted write actions (e.g. moving, renaming).

@niksis02 niksis02 self-assigned this Feb 14, 2025
@niksis02 niksis02 moved this to Todo in VersityGW Project Feb 14, 2025
@niksis02 niksis02 moved this from Todo to In Progress in VersityGW Project Feb 18, 2025
@niksis02 niksis02 removed their assignment Feb 18, 2025
@niksis02 niksis02 removed the status in VersityGW Project Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants