LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Linux ACL odd output (https://www.linuxquestions.org/questions/linux-security-4/linux-acl-odd-output-4175657466/)

mr.aghazade 07-16-2019 02:19 AM

Linux ACL odd output
 
hi friends
i have a senario but i cant implement that
i create a file with some text in it & remove all permissions :
Code:

# echo "hi Linux" > myFile
# chmod a-rwx myFile
# ls -l myFile
---------- 1 root root 9 Jul 15 11:41 myFile

i have a user with name reza & i want only reza user can read this file & do this via ACL(Access Control List)

Code:

# setfacl -m u:reza:r myFile
output of ls -l is very ODD:

Code:

# ls -l myFile
----r-----+ 1 root root 9 Jul 15 11:41 myFile

read permission added for root group ,,,,what is it mean ?

Code:

# getfacl myFile
# file: myFile
# owner: root
# group: root
user::---
user:reza:r--
group::---
mask::r--
other::---

& in output of getfacl command, what is the mask ??

thank you for answring...

scasey 07-16-2019 10:46 AM

Code:

setfacl -m u:reza:r myFile
According to the man page, this grants read access to an "additional" user. Can that user now access the file?

See man getfacl for what the mask is/means.

mr.aghazade 07-18-2019 08:35 AM

Quote:

Originally Posted by scasey (Post 6015560)
Code:

setfacl -m u:reza:r myFile
According to the man page, this grants read access to an "additional" user. Can that user now access the file?

See man getfacl for what the mask is/means.

thank you for aswering...
yes,,the Additional user can access data ,

my question is about realation between ACL & group user.
because ACL permission shown as group permission...

scasey 07-18-2019 08:47 AM

It's my understanding that's what access control lists are about; group permissions.


All times are GMT -5. The time now is 12:59 PM.