Hi,
I'm trying to learn about ACLs in Linux. I've created a directory, /root/how-to\'s. I want it to have the file permissions 600. But I also want all files and directories that are created under the /root/how-to\'s directory to have the same file permissions. So, I type this:
And I think, okay, we're good.
Then I go into the how-to\'s directory and touch a file called file and then I list the file
But much to my surprise, the file is created with group read / write permissions, so the file has permissions 660, instead of 600.
Any ideas what I'm doing wrong and what the proper setfacl command is? I even tried setting the group permission to ---, but still, no luck.
Thanks
I'm trying to learn about ACLs in Linux. I've created a directory, /root/how-to\'s. I want it to have the file permissions 600. But I also want all files and directories that are created under the /root/how-to\'s directory to have the same file permissions. So, I type this:
Code:
root@franklin:[~]# setfacl -b how-to\'s/ root@franklin:[~]# setfacl -Rdm u:root:rw how-to\'s root@franklin:[~]# getfacl how-to\'s # file: how-to's # owner: root # group: root user::rw- group::--- other::--- default:user::rw- default:user:root:rw- default:group::--- default:mask::rw- default:other::---
Then I go into the how-to\'s directory and touch a file called file and then I list the file
Code:
root@franklin:[~/how-to's]# touch file root@franklin:[~/how-to's]# ls -ld file -rw-rw----+ 1 root root 0 Dec 9 17:50 file
Any ideas what I'm doing wrong and what the proper setfacl command is? I even tried setting the group permission to ---, but still, no luck.
Thanks
Comment