티스토리 뷰

POSIX file permissions are not inherited; they are given by the creating process and combined with its current umask value.

However, you can use POSIX ACLs to achieve this. Set the default ACL on a directory:

setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent

This will apply setfacl to the /path/to/parent directory, -modifying the -default ACLs – those that will be applied to newly created items. (Uppercase X means only directories will receive the +x bit.)

(If needed, you can add a u:someuser:rwX or g:someuser:rwX – preferably a group – to the ACLs.)

linux - How to set file permissions so that new files inherit same permissions? - Super User

linux - How to make new file permission inherit from the parent directory? - Super User

댓글