mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 22:18:14 -05:00
docker: Add support for setting umask (#9429)
Add support for setting umask value in the Docker `entrypoint.sh` script. This is useful when not syncing permissions and working with groups, and needing umask values like `002` instead of `022`.
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
set -eu
|
||||
|
||||
[ -n "${UMASK:-}" ] && umask "$UMASK"
|
||||
|
||||
if [ "$(id -u)" = '0' ]; then
|
||||
binary="$1"
|
||||
if [ "${PCAP:-}" == "" ] ; then
|
||||
if [ -z "${PCAP:-}" ]; then
|
||||
# If Syncthing should have no extra capabilities, make sure to remove them
|
||||
# from the binary. This will fail with an error if there are no
|
||||
# capabilities to remove, hence the || true etc.
|
||||
|
||||
Reference in New Issue
Block a user