Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

file/directory permissions trailing + ( drwxr-xr-x+ ) [closed]

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 .

like image 742
Gurdyal Avatar asked Dec 07 '22 17:12

Gurdyal


2 Answers

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

like image 73
dlmeetei Avatar answered Dec 11 '22 08:12

dlmeetei


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
like image 38
Raman Sailopal Avatar answered Dec 11 '22 09:12

Raman Sailopal