0

I have a folder /PPI/production/PDF_plan/ on SLES 12 SP1 system. Please find the details below.

SERVER1:~ # getfacl /PPI/production/PDF_plan/
getfacl: Removing leading '/' from absolute path names
# file: PPI/production/PDF_plan/
# owner: ppi
# group: ppi
user::rwx
group::r-x
other::r-x

Then I gave rwx permission for a group called AdCNC as below

SERVER1:~ # setfacl -Rdm g:AdCNC:rwx /PPI/production/PDF_plan/
SERVER1:~ #

ncaps1 is a user under AdCNC group.

SERVER1:~ # grep ncaps1 /etc/group
AdCNC:x:1005:ncaps1
SERVER1:~ #

Please find below the getfacl output on this folder now. It clearly shows that AdCNC group now has the rwx permission on this folder.

SERVER1:~ #
SERVER1:~ # getfacl /PPI/production/PDF_plan/
getfacl: Removing leading '/' from absolute path names
# file: PPI/production/PDF_plan/
# owner: ppi
# group: ppi
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:group:AdCNC:rwx
default:mask::rwx
default:other::r-x

But When I try to create a folder or write a file on /PPI/production/PDF_plan/ I am getting 'Permission denied' error message.

SERVER1:~ # su ncaps1
ncaps1@SERVER1:/root> cp /Ran/ExistingConfiguration/smb.conf /PPI/production/PDF_plan/
cp: cannot create regular file ‘/PPI/production/PDF_plan/smb.conf’: Permission denied
ncaps1@SERVER1:/root> mkdir /PPI/production/PDF_plan/TestFolder 
mkdir: cannot create directory ‘/PPI/production/PDF_plan/TestFolder’: Permission denied
ncaps1@SERVER1:/root>

Please help me to fix this problem.

0

Instead of executing:

setfacl -Rdm g:AdCNC:rwx /PPI/production/PDF_plan/

Execute:

setfacl -Rm g:AdCNC:rwx /PPI/production/PDF_plan/

With the d you are applying to default. The output of:

getfacl /PPI/production/PDF_plan/

Should be:

SERVER1: ~ # getfacl /PPI/production/PDF_plan/
getfacl: Removing leading '/' from absolute path names
# file: PPI/production/PDF_plan/
# owner: ppi
# group: ppi
user::rwx
group::r-x
group:AdCNC:rwx
other::r-x
default:user::rwx
default:group::r-x
default:mask::rwx
default:other::r-x

For more information please see the POSIX Access Control Lists on Linux whitepaper put together by Andreas Grünbacher of the SuSE Labs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.