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
?
Asked
Active
Viewed 1,131 times
2

spiffytech
- 1,063
- 2
- 11
- 17
1 Answers
1
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.

Nasir Riley
- 2,137
- 9
- 10
-
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 04 '18 at 05:54
-
@shodanshok I've added that and something else to the answer. – Nasir Riley Oct 04 '18 at 07:39