Skip to main content
50 votes
Accepted

How to remove ACL from a directory and back to usual access control?

Our problem was resolved by using: setfacl -bn foobar The point was we also had to remove the aclMask from the directory with an option -n... The man page of setfacl says as follows: -n Do ...
Taiki Bessho's user avatar
  • 1,105
19 votes
Accepted

Why was POSIX.1e withdrawn?

I seem to have hit paydirt here. I searched the "usual haunts" and found nada, then thought, hey, where in the good 'ole days would *NIX freaks post about this stuff? Usenet. They would post on ...
wurtzkurdle's user avatar
18 votes
Accepted

View extended ACL for a file with '+' in ls -l output

The names getfacl and setfacl as in Tom Hale's answer are semi-conventional and are derived from the original TRUSIX names getacl and setacl for these utilities. However, on several operating systems ...
JdeBP's user avatar
  • 68.9k
18 votes

Difference between chmod vs ACL

One is not better than the other, they are just different methods and way of thinking. You can use both permissions system on the same path without problems. They interfere with each other when ...
Zulgrib's user avatar
  • 984
16 votes

How to remove ACL from a directory and back to usual access control?

You should try using recursive option. setfacl -R -b foobar There is no need for -n option
Ajitabh Pandey's user avatar
16 votes
Accepted

What is the exact purpose of `mask` in file system ACL?

What This 3-bit ACL system has its roots in TRUSIX. Other ACL systems, such as the NFS4-style ones in FreeBSD, MacOS, AIX, Illumos, and Solaris, work differently and this concept of a mask access ...
JdeBP's user avatar
  • 68.9k
14 votes
Accepted

Operation not supported with setfacl?

The ext4 code in older kernels (I do not know until when) needs acl as mount option. So you may try: mount -o remount,acl / /etc/fstab Your fstab contains a line like /dev/sda3 / ext4 ...
Hauke Laging's user avatar
  • 90.4k
11 votes

Difference between chmod vs ACL

The classic Unix permissions set by chmod (read/write/execute, user/group/other) have existed for a lot longer than ACL. If ACL had existed from the start then there wouldn't be a chmod as we know it. ...
Gilles 'SO- stop being evil''s user avatar
10 votes
Accepted

Precedence of ACLS when a user belongs to multiple groups

From the standard: In words, Common Access Determination Algorithm is to be interpreted as follows (this description is a loose paraphrase of the common access determination algorithm which is ...
Fox's user avatar
  • 8,193
9 votes

How does ACL calculate the effective permissions on a file?

Short answer: If you want mask with the execute bit on, you must explicitly set it using setfacl after touch. Security forbids its implicit setting. setfacl -n -m m::rwx foo "-n" to suppress ...
HiTechHiTouch's user avatar
9 votes
Accepted

chmod returns: invalid mode:

You’re missing the title of the document you’re reading: Oracle Solaris ZFS Administration Guide. It applies to Solaris, which is another operating system; you should look for documentation relating ...
Stephen Kitt's user avatar
8 votes

How to determine if NFS mount is mounted as v3 or v4?

Don't forget the ultimate authority! cat /proc/mounts
gregmark's user avatar
8 votes
Accepted

Can I take away permission from a specific user in the command setfacL?

Yes, you can specify - in the relevant permission field to set an ACL with restricted permissions: setfacl -m u:user:--- myfolder This doesn’t work to restrict the permissions of the owner, which ...
Stephen Kitt's user avatar
7 votes
Accepted

Is it possible to create a "negative" ACL?

Sure, to demonstrate, as root... touch /tmp/test setfacl -m u:jdoe:--- /tmp/test getfacl /tmp/test su - jdoe cat /tmp/test exit rm /tmp/test It could be done to every file in a directory by default ...
Christopher's user avatar
  • 15.9k
7 votes

How do I mount an XFS partition enabling ACL?

Just use mount with no options. For xfs, ACL are always enabled. (That may not have been the case in the very distant past, but it would be way before Fedora 25.) This is also the case with other ...
Gilles 'SO- stop being evil''s user avatar
7 votes
Accepted

Linux: an easy and elegant way to find all files with acl set?

Easy and elegant is quite a high bar to reach and your dirty solution fails if you have filenames with + in it (say c++). The alternative is using getfacl recursively, skipping files that don't have ...
Eduardo Trápani's user avatar
6 votes

What relationships tie ACL mask and standard group permission on a file?

I finally understood what exactly is occurring when I saw this link Handling ACLs Specifically, that masks basically take the place of, and function to replace NAMED USER and all GROUP permissions. ...
jjisnow's user avatar
  • 161
6 votes

Can directories and file inherit same permissions as parent directory?

You can achieve that with ACLs, check this answer for an introduction: https://unix.stackexchange.com/a/12847/130303 You'll probably need default ACLs to achieve what you want to do. Lets say you ...
Jakob Lenfers's user avatar
6 votes

Properly set execute bit based on file type?

This will go through your files and set the executable bit according to whether file believes that the file should be executable: find /var/www/html -type f -exec bash -c 'if file -b "$1" | grep -q ...
John1024's user avatar
  • 74.7k
6 votes
Accepted

Equivalent of subinacl.exe on linux / unix?

setfacl is designed to accept getfacl output as input. Meaning you can run getfacl, save the output to a file, do your thing, then restore the ACL. The exact procedure can vary depending on your ...
Bratchley's user avatar
  • 16.8k
6 votes
Accepted

Not able to give write permission to other user with ACL or chmod

Your expectation is correct: the permissions should allow rocky to write to afile, since rocky has the write permission on the file and execute permission on all the containing directories. However, ...
Gilles 'SO- stop being evil''s user avatar
5 votes
Accepted

Access control lists and permission on directory

The line setfacl -m d:Bob:rwx /root will set a "default" for new directories created inside /root but doesn't change that directory itself. You may have meant setfacl -m u:Bob:rwx /root Note that ...
Stephen Harris's user avatar
5 votes

View extended ACL for a file with '+' in ls -l output

Use getfacl: getfacl //var/log/journal/ebaaabbb8e1745b38c4ef233edcdb4cd/[email protected]~ getfacl: Removing leading '/' from absolute path names # file: var/log/...
Tom Hale's user avatar
  • 30.6k
5 votes

ACLs - the same acl's on all newly created files automatically

On your system, the files in /tmp disappear on reboot, right? Maybe this is not a good location for a permanent solution. When setting an ACL on a directory that should apply the ACL to all new file ...
Christopher's user avatar
  • 15.9k
5 votes
Accepted

How can I make ACL settings on /run/media/* persistent?

It's a hack, but you could just write a quick systemd service to run it on startup, perhaps in /etc/systemd/system/set-qemu-acl.service. [Unit] Description=QEMU ACL Hack Requires=local-fs.target ...
Q23's user avatar
  • 413
5 votes

How do I use rsync to reliably transfer permissions & ACLs when copying from NTFS internal C: to NTFS External disk?

I've been looking at this over the last several days, and after reading lots of references and actually trying out various combinations of flags, I don't think that rsync will carry Windows ACLs. ...
Chris Davies's user avatar
5 votes
Accepted

Why does chown reset/remove the SUID bit and reset capabilities?

The permissions and capability sets aren’t cleared by the chown utility, they’re cleared by the chown system call (on Linux): When the owner or group of an executable file is changed by an ...
Stephen Kitt's user avatar
4 votes

setgid sticky bit not working

The method you made would work with programs that don't specifically manage their output permissions and ownership, but rsyslogd does. Rsyslogd's output module documentation page shows that you can ...
Julie Pelletier's user avatar
4 votes

Setting rwx default permissions for the group, but just rw default permissions for files

If you set the x flag for everything then the user "create" permissions, will also take effect. which means that typically files won't have the x flag: $ setfacl -d -m u::rwx . $ setfacl -d -m g::rwx ...
Stephen Harris's user avatar
4 votes
Accepted

ACL named group permissions not overriding file permissions. Why?

The posix permissions have priority over your acl. So when you chmod the file after the acl is given you are changing the acl mask. There is a great write up here: https://serverfault.com/questions/...
JasonC's user avatar
  • 56

Only top scored, non community-wiki answers of a minimum length are eligible