【问题标题】:Change user and group of files更改用户和文件组
【发布时间】:2013-09-30 22:29:57
【问题描述】:

我想知道是否可以自动将文件用户和组更改为与父级的用户和组相同。 例如。现有问题

getfacl /home/Test/UPS/
getfacl: Removing leading '/' from absolute path names
# file: home/Test/UPS
# owner: user1
# group: basegroup
user::rwx
group::r-x
other::r-x

ls -l /home/Test/UPS/
-rw-r--r-- 1 user1 basegroup 1450 Jul 12 11:54 file.edi

ls -l /home/Test/UPS/
-rw-r--r-- 1 user2 group2 1450 Jul 12 11:54 file.edi

my group2 is part of basegroup

I want files with permission as below automatically whenever file comes into  /home/Test/UPS/ directory.

ls -l /home/Test/UPS/
-rw-r--r-- 1 user1 basegroup 1450 Jul 12 11:54 file.edi

Please help...

【问题讨论】:

    标签: linux file unix file-permissions


    【解决方案1】:

    我知道您可以对 samba 挂载目录使用强制组和强制用户,但我不知道有任何方法可以自动覆盖本地目录中的用户和组

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-07-24
      • 2019-07-28
      • 2021-09-25
      • 1970-01-01
      • 1970-01-01
      • 2012-12-14
      • 1970-01-01
      相关资源
      最近更新 更多