Skip to content

Conversation

@scottfridwin
Copy link

This adds a new configuration setting that allows setting a specific umask value for each user. The umask is a string variable, but it should be a valid umask value. The config looks like this:

"Users": [ { "Username": "user1", "Password": "pass1", "UID": 1001, "GID": 1003, "Chroot": { "Directory": "/user", "StartPath": "drop" } }, { "Username": "user2", "Password": "pass2", "UID": 1002, "GID": 1016, "Chroot": { "Directory": "/user", "StartPath": "drop" }, "Umask": "002" } ] 

and it generates this in the sshd_config file:

Match User "user2" X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp -u 002 

Tested it on a custom image and it allowed me to upload files with -rw-rw-r-- permissions instead of default -rw-r--r-- permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant