PowerScale:OneFS:從 OneFS 命令行介面管理 Windows ACL 權限

Summary: 建議透過 SMB 連線至資料夾,並使用 Windows 檔案總管介面來管理 Windows 權限。但在某些情況下,可能需要使用 CLI。本文介紹如何執行此操作。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

若要顯示檔案/資料夾上的現有權限,請執行:
ls -led <path to file/folder>
例如:
# ls -led file
-rwxrwxrwx +  1 root  wheel  0 Jul  2 14:02 file
 OWNER: user:root
 GROUP: group:wheel
 0: group:Users allow file_gen_read,file_gen_write
 1: user:root allow file_gen_read,file_gen_write,std_write_dac
 2: group:wheel allow file_gen_read
 3: everyone allow file_gen_all

變更權限

若要在命令行介面 (CLI) 中變更權限,請使用: chmod,您必須登入身為 root

有兩種方法可以識別要放入訪問控制清單 (ACL) 中的所需許可權條目。如果可能,建議使用第一個。

  1. 透過 SMB 找到或建立具有所需權限的檔案/資料夾並執行 ls -led <file or folder>。這可以是任何 PowerScale 叢集上任何檔案/資料夾上任何使用者/群組所想要的權限項目。 
  2. 檢視手冊中每個權限項目的說明 chmod (man chmod),並確定您的工作流程需要哪些。

為使用者/群組新增權限項目

在本例中,使用方法 1,但無論您是否從手冊中識別要新增的權限類型,設定權限的命令都是相同的 chmod (man chmod) 或查看具有所需許可權的檔。

使用者和組的命令是相同的,除了單詞”user' 替換為 'group'或相反:  chmod +a group "<domain name>\<group name>" allow <permissions to add> <file or folder>

例如,如果要設置檔的許可權條目,則上面的使用者組 file2 對於 Active Directory 域”AD'組'domain users' 您將使用此命令:

# chmod +a group "AD\domain users" allow file_gen_read,file_gen_write file2
# ls -led file2
-rw-rw-r-- +  1 root  wheel  0 Jul  2 14:09 file2
 OWNER: user:root
 GROUP: group:wheel
 0: group:Domain Users allow file_gen_read,file_gen_write
 1: user:root allow file_gen_read,file_gen_write,std_write_dac
 2: group:wheel allow file_gen_read
 3: everyone allow file_gen_read

要刪除存取控制條目,您可以刪除所需使用者或組或要刪除的許可權類型的整行。然後,您可以使用所需許可權添加新條目。刪除條目的命令與添加條目的命令相同,只是您更改了”+a' 與 '-a」。例如,如果要從上述檔中為 root 使用者刪除該條目,則可以使用此命令:

# chmod -a user root allow file_gen_read,file_gen_write,std_write_dac file
# ls -led file
-rwxrwxrwx +  1 root  wheel  0 Jul  2 14:02 file
 OWNER: user:root
 GROUP: group:wheel
 0: group:Users allow file_gen_read,file_gen_write
 1: group:wheel allow file_gen_read
 2: everyone allow file_gen_all

對於像大家這樣的知名團體,請離開團體。例如,若要移除所有人的寫入存取權,但從上述檔案中保留其他存取層級,您可以使用以下命令:

# chmod -a everyone allow file_gen_write file
# ls -led file
-rwxrwxr-x +  1 root  wheel  0 Jul  2 14:02 file
 OWNER: user:root
 GROUP: group:wheel
 0: group:Users allow file_gen_read,file_gen_write
 1: group:wheel allow file_gen_read
 2: everyone allow std_delete,std_write_dac,std_write_owner,file_read,file_read_ext_attr,execute,delete_child,file_read_attr

要啟用新檔和資料夾的繼承,請添加到許可權條目”object_inherit' 和 'container_inherit'分別。例如,如果要為資料夾上的本地組使用者添加條目 dir 若要授予對新檔和資料夾的完全訪問許可權和繼承,請使用以下命令:

# chmod +a group users allow dir_gen_all,object_inherit,container_inherit dir
# ls -led dir
drwxrwxr-x +  2 root  wheel  0 Jul  2 14:22 dir
 OWNER: user:root
 GROUP: group:wheel
 0: group:Users allow dir_gen_all,object_inherit,container_inherit
 1: user:root allow dir_gen_read,dir_gen_write,dir_gen_execute,std_write_dac,delete_child
 2: group:wheel allow dir_gen_read,dir_gen_execute
 3: everyone allow dir_gen_read,dir_gen_execute

您也可以使用 SID、UID 或 GID 來編輯 ACE。對於執行此操作的語法,下面是一些範例:

chmod +a sid <actual SID> <target path>
chmod +a user <actual UID> <target path>
chmod +a group <actual GID> <target path>

Additional Information

此Microsoft文章介紹了 Windows 所述的每個許可權類型,但有關每個許可權的詳細資訊,鍵入為 ls led 在 PowerScale 上,請參閱 man chmod檔案與資料夾權限外部連結

參考資料:

Affected Products

PowerScale OneFS

Products

PowerScale OneFS
Article Properties
Article Number: 000010579
Article Type: How To
Last Modified: 19 Jun 2026
Version:  9
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.