I'd like to set up shared directory trees where users can do full read-write and execute executables, and create and delete directories, and where all new files and directories created by anyone, including root, automatically are given exactly the same permissions. How is this done?

  • 1
    might be a copy of unix.stackexchange.com/questions/1314/… – imbuedHope Feb 2 '18 at 19:09
  • Setting the umask properly ... of course, how to do that depends on exactly how you are sharing stuff - via samba (create mask and directory mask directives), sftp (umask can be set per-user or per-group in the sshd_config), etc – ivanivan Feb 2 '18 at 19:34
  • NFS to the LAN, Resilio sync to offline. "g" keeps losing write. – JEB of Ponderworthy Feb 3 '18 at 0:40

Perhaps you can just create a group, and set the /etc/sudoers file and allow creating and deleting in a desired directory.

addgroup guest
usermod -a -G guest

in the /etc/sudoers file under group sudo

guest ALL:(ALL) /bin/mkdir

and just make the desired directory writable by giving it a reasonable chmod command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.