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>。只要使用者/群組在任何 Isilon 上的任何檔案/資料夾上擁有所需的權限,即可是任何權限項目。 
  2. 檢視手冊中每個權限項目的說明 chmod (man chmod),並確定您的工作流程需要哪些。

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

在本例中,我使用方法一,但無論您是否從手冊中識別要新增的權限類型,設定權限的命令都是相同的 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

檔案與資料夾權限

參考資料:

Dell PowerScale OneFS:身份驗證、身份管理和授權 (delltechnologies.com)
Dell EMC PowerScale OneFS (delltechnologies.com 上的存取控制清單

Affected Products

PowerScale OneFS

Products

PowerScale OneFS
Article Properties
Article Number: 000010579
Article Type: How To
Last Modified: 07 Nov 2025
Version:  7
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.