gpt4 book ai didi

linux - 尽管用户在 SUSE Linux 上具有 rwx 权限,但他们对文件夹的访问被拒绝

转载 作者:太空宇宙 更新时间:2023-11-04 05:22:16 27 4
gpt4 key购买 nike

我在 SLES 12 SP1 系统上有一个文件夹/PPI/product/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:~ #

ncaps1AdCNC 组下的用户。

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/product/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>

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

最佳答案

default:group:AdCNC:rwx 不是 AdCNC 在此文件夹中的权限,这意味着 AdCNC 对将来创建的子文件夹的“rwx”权限。

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

setfacl -Rm g:AdCNC:rwx/PPI/生产/PDF_plan/

关于linux - 尽管用户在 SUSE Linux 上具有 rwx 权限,但他们对文件夹的访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39909793/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com