简体   繁体   中英

How to exclude a specific user from a file but allow all others to read?

There is file that I want to share with everyone, except from 3 specific users.

I can use the linux extended attributes to create an ACL and give access to specific users, but the problem is that I don't know all the users, I know only the blacklisted ones.

setfacl -m u:user1:r test1

Is there a way to do that by creating an ACL for the blacklisted user accounts?

I found out in the meanwhile....

# setfacl -m u:mat:0 mymat
# setfacl -m u:user1:0 test1

# getfacl test1
# file: test1
# owner: root
# group: root
user::rw-
user:user1:---
group::r--
mask::r--
other::r--

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM