I have a directory with strange permissions ( drwxr-xr-x+ ) - trailing ( + ) as 11th character, which seems to force all the files and subdirectories to assume rwxrwxrwx permissions, Following is the permissions.
drwxr-x---+ 3 root root 4096 Dec 22 15:33 directory
I want to get rid of this trailing ( + ). I have tried following .
chmod 755 directory/
chmod a-x directory/
chmod u=rwx,g=rw,o=x directory/
I have tried following as well :
sudo chmod u=rwx,g=rx,o-x,u-s,g-s directory/
Any help will be appreciated . Thanks - I am stuck .
The trailing +
signify that ACL
, Access Control List, is set on the directory.
You can use getfacl
to get the details
getfacl directory
Following output is from getfacl Codespace
which have ACL set by setfacl -m u:umesh:rw Codespace
.
Here setfacl
is giving rw
permission to Codespace
directory for user umesh
.
# file: Codespace/
# owner: root
# group: root
user::rwx
user:umesh:rw-
group::r-x
mask::rwx
other::r-x
and we can remove the ACL
using setfacl
, for example, for the above sample
setfacl -x u:umesh Codespace/
More details at man setfacl
and man getfacl
The + when listing a file will signify extended permissions on the file. These permissions will be set with access control lists. If you run "getfacl directory" you will see the extended permissions on the directory.
Depending on how the access control lists are set up, to remove, run:
setfacl -x u:username directory
and/or
setfacl -x g:groupname directory
To remove the + from the listing, you may also need to run:
setfacl -x m directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With