Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Granting Access Permission to a file to a specific user [closed]

In linux, how can I give access permissions to a file/folder to a specific person. In other words suppose I want to allow only and only user fred to be able to read a file, then how do I do that?

Note that I know about chmod and all, but Linux doesn't seem to provide a fine tuned access permission control where you can specify the access control of one specific user.

Thanks, Alison

like image 287
Alison Lee Avatar asked Feb 20 '12 02:02

Alison Lee


1 Answers

Unix uses discretionary access control (DAC) for permissions and access control. For better security SELinux provide mandatory access control (MAC). This is consider difficult for administrators to set up and maintain.

Use commands:

chown user_name file
chown user_name folder
chown -R user_name folder #recursive
like image 174
Daniel Avatar answered Oct 14 '22 12:10

Daniel