Linux, Why can't I write even though I have group permissions?

前端 未结 6 1517
醉酒成梦
醉酒成梦 2021-01-30 12:30

I want to create a file in a directory owned by the staff group which I am a member of. Why can I not do this?

bmccann@bmccann-htpc:~$ ls -l /usr/local/lib/R/
t         


        
6条回答
  •  囚心锁ツ
    2021-01-30 12:52

    Use Linux ACL (access control lists) - it is more fine-grained version of permission system,

    setfacl -R -m 'group:staff:rwx' -m 'd:group:staff:rwx' /usr/local/lib/R/
    

    This sets both active rights for directory and default rights for anything created within.

    This fails to work without relogin if you've just added yourself to the staff group, but you may set the permission only for yourself for the current session.

提交回复
热议问题