[GH-ISSUE #506] Add a configuration item to set unix domain socket files permissions for docker #286

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

Originally created by @wayilive on GitHub (Dec 24, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/506

Add a configuration item to set unix domain socket files permissions, this feature exists in alist, alist's configure file has a configuration item 'unix_file_perm' and usually has a value '0666'.

I want to combine using dufs and nginx in one docker compose file and share the unix domain socket between container and the host.

Originally created by @wayilive on GitHub (Dec 24, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/506 Add a configuration item to set unix domain socket files permissions, this feature exists in alist, alist's configure file has a configuration item 'unix_file_perm' and usually has a value '0666'. I want to combine using dufs and nginx in one docker compose file and share the unix domain socket between container and the host.
zhus closed this issue 2026-04-08 16:51:44 +03:00
Author
Owner

@sigoden commented on GitHub (Dec 24, 2024):

We will not support this feature. This configuration is too trivial.

Please change the file permissions manually after Dufs creates the socket file.

Another option is to change the umask settings. The default file permissions for a Unix domain socket path created by a Rust program are determined by the umask setting.

<!-- gh-comment-id:2560698243 --> @sigoden commented on GitHub (Dec 24, 2024): We will not support this feature. This configuration is too trivial. Please change the file permissions manually after Dufs creates the socket file. Another option is to change the umask settings. The default file permissions for a Unix domain socket path created by a Rust program are determined by the umask setting.
Author
Owner

@Puqns67 commented on GitHub (Apr 19, 2025):

PS: In systemd.service, you can add this line to change UNIX socket permissions after dufs start.

  • This assumes that your UNIX socket is under /run/dufs, and you can modify it yourself.
ExecStartPost=/usr/bin/bash -c '/usr/bin/sleep 1; for file in /run/dufs/*; do if [ -S "$file" ]; then /usr/bin/chmod 0660 "$file"; fi; done'
<!-- gh-comment-id:2816537541 --> @Puqns67 commented on GitHub (Apr 19, 2025): PS: In systemd.service, you can add this line to change UNIX socket permissions after dufs start. * This assumes that your UNIX socket is under `/run/dufs`, and you can modify it yourself. ```service ExecStartPost=/usr/bin/bash -c '/usr/bin/sleep 1; for file in /run/dufs/*; do if [ -S "$file" ]; then /usr/bin/chmod 0660 "$file"; fi; done' ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#286