How to give ACL permission to a specific file


#1

Hi everyone!

I have a log file called access_log.2016.06.15 that generates everyday and it’s generated with different date. For example the following day will call access_log.2016.06.16 and the day after tomorrow will call access_log.2016.06.16.

I want to give ACL permissions to a specific user to that file generated each day. How can I do it?

Regards!
Jose Rios


#2

Hi

You can overcome this by using -d (default) option, this allows us to set an acl rule to be the default rule. When this is set on a directory then all new files or directories created within that directory inherit the same acl rules.

It is just like chmod -R ( not same as )

#setfacl -dm u:xxxxxxxxxx:rw /directory 

by using the above command you can give the r,w permission to all newly created files or auto generated files in /directory.


#3

Thank you so much @raghuu, it worked fine!

Regard!!!