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

谁说胖子不能爱 提交于 2019-12-20 10:36:56

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/9355625/granting-access-permission-to-a-file-to-a-specific-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!