虽然用户在SUSE Linux上拥有rwx权限,但用户的文件夹访问被拒绝

时间:2016-10-07 05:06:38

标签: linux ubuntu permissions acl suse

我在SLES 12 SP1系统上有一个文件夹/ PPI / production / PDF_plan /。请在下面找到详细信息。

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

然后我给了一个名为 AdCNC 的群组的rwx权限,如下所示

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

ncaps1 AdCNC 组下的用户。

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

请在下面找到此文件夹中的getfacl输出。它清楚地表明 AdCNC 组现在拥有此文件夹的rwx权限。

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

但是当我尝试在/ PPI / production / PDF_plan /上创建文件夹或写入文件时,我收到“拒绝访问”错误消息。

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>

请帮我解决这个问题。谢谢

1 个答案:

答案 0 :(得分:0)

默认:组:AdCNC:rwx不是AdCNC在此文件夹中的权限,它表示权限" rwx"来自AdCNC的子文件夹将在未来创建。

让我们运行(不带-d选项):

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