Files permissions

maelamrani

Member
Joined
Jan 3, 2020
Messages
77
Reaction score
7
Credits
450
Hello,
how to give all new file specific permissions in a folder.
For exp i have a folder /myfiles and all new files created in this folder will get 775.
Kind regards,
 


You can configure that for the user by setting a umask in the user's ~/.bash_profile or ~/.bashrc if the default umask isn't giving the the wanted permissions for created files and directories.
 
But this manipulation will change permissions for all files created, i should you default acl to inherite permissions
 
But this manipulation will change permissions for all files created, i should you default acl to inherite permissions
I was just giving you the easier option, is there a reason you only want it for one folder? If you want it for a specific folder you are going to use ACL's using the mask option and why ask a question to which you already know the answer to?
 
i didnt know the answer, i found it in between my post and your answer, but i still have an issue the defautl ACL is applied on the folders and not the files.
I did : setfacl -dm o::5 folder/

drwx---r-x+ 2 root root 4096 Apr 20 13:19 dir => OK
-rw----r-- 1 root root 0 Apr 20 13:19 file => NOK

Should i use the umask acl ?

Kind regards,
 
Try using a default ACL on the directory instead then, take this as an example.
 

Staff online

Members online


Latest posts

Top