I have an AWS EFS share, which does not support filesystem ACLs. How can I set a folder inside the EFS share to default to mode 664?


with umask:

umask 002 /the/directory

That will set the directory itself and the directories inside to have 775 permissions and the files to have 664 permissions.

The directory (and subdirectories) will have execute permissions for owner, group, and others in order to allow them to be traversed. The files will have read-write for the owner, read-write for the group, and read for others.

As mentioned below, this also depends on the processes writing to the directory. Other users with modify access can also change the umask itself or for the subdirectories inside if any exist.

  • Please note that umask is a per-process setting - you need to take that into account if multiple processes are used to create files into the directory. – shodanshok Oct 4 '18 at 5:54
  • @shodanshok I've added that and something else to the answer. – Nasir Riley Oct 4 '18 at 7:39

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.