[GH-ISSUE #441] Seperate upload and delete permissions #240

Closed
opened 2026-04-08 16:51:24 +03:00 by zhus · 5 comments
Owner

Originally created by @bonsairobo on GitHub (Aug 27, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/441

Specific Demand

I want to specify ACLs using seperate "upload" and "delete" permissions. This would allow me to have users that can upload to a directory without deleting anything.

Implementation suggestion

I think the simplest option would be to split the w permission into c and d, for create and delete. This could maintain backwards compatibility by making w imply cd, but something like rc would only imply read and create, not delete.

This scheme is a bit different from how the existing ACLs work though. As I understand it, there is only ro and rw. So o does not mean anything on its own. There might need to be specific handling of that for backwards compatibility.

Another point worth considering is whether update and create should have separate permissions. Update also has the capacity to be destructive like a delete, just by overwriting a file with an empty byte array.

Originally created by @bonsairobo on GitHub (Aug 27, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/441 ## Specific Demand I want to specify ACLs using seperate "upload" and "delete" permissions. This would allow me to have users that can upload to a directory without deleting anything. ## Implementation suggestion I think the simplest option would be to split the `w` permission into `c` and `d`, for create and delete. This could maintain backwards compatibility by making `w` imply `cd`, but something like `rc` would only imply read and create, not delete. This scheme is a bit different from how the existing ACLs work though. As I understand it, there is only `ro` and `rw`. So `o` does not mean anything on its own. There might need to be specific handling of that for backwards compatibility. Another point worth considering is whether update and create should have separate permissions. Update also has the capacity to be destructive like a delete, just by overwriting a file with an empty byte array.
zhus closed this issue 2026-04-08 16:51:24 +03:00
Author
Owner

@sigoden commented on GitHub (Aug 27, 2024):

With Upload without delete, you might encounter situations where incorrectly uploaded files cannot be deleted, and interrupted uploads can neither be resumed nor removed.

<!-- gh-comment-id:2311752990 --> @sigoden commented on GitHub (Aug 27, 2024): With `Upload without delete`, you might encounter situations where incorrectly uploaded files cannot be deleted, and interrupted uploads can neither be resumed nor removed.
Author
Owner

@bonsairobo commented on GitHub (Aug 27, 2024):

AFAICT my only way to work around this is to have separate accounts and home directories for every user. Is it possible to update the dufs config file without restarting the service? This would let me build a dynamic user management service on top of dufs.

<!-- gh-comment-id:2311795412 --> @bonsairobo commented on GitHub (Aug 27, 2024): AFAICT my only way to work around this is to have separate accounts and home directories for every user. Is it possible to update the dufs config file without restarting the service? This would let me build a dynamic user management service on top of dufs.
Author
Owner

@sigoden commented on GitHub (Aug 27, 2024):

No plan

<!-- gh-comment-id:2311810014 --> @sigoden commented on GitHub (Aug 27, 2024): No plan
Author
Owner

@bonsairobo commented on GitHub (Aug 27, 2024):

No plan to support config updates?

<!-- gh-comment-id:2311819645 --> @bonsairobo commented on GitHub (Aug 27, 2024): No plan to support config updates?
Author
Owner

@sigoden commented on GitHub (Aug 27, 2024):

There's no plan to watch the configuration file for changes and restart the service.

This complicates things considerably without offering much benefit.

<!-- gh-comment-id:2311864066 --> @sigoden commented on GitHub (Aug 27, 2024): There's no plan to watch the configuration file for changes and restart the service. This complicates things considerably without offering much benefit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#240