最近有個客戶遇到一個問題,之前在NETAPP CIFS中有個檔案夾隻有一個使用者有權限可以通路,其他使用者包括管理者均沒有權限通路,現在當此使用者離職後,賬号已在AD中删除,此時管理者需要修改此檔案夾的權限,要如何操作。
這裡NETAPP官方提供了一個叫secedit的工具,使用這個工具再配合指令行就可以強制修改指定檔案夾的權限,方法如下:
1. SSH到NETAPP控制器的指令行界面,輸入指令:
fsecurity show /vol/volname
将會傳回以下類似的内容:
Netapp-1> fsecurity show /vol/test [/vol/test - Directory (inum 64)] Security style: NTFS Effective style: NTFS DOS attributes: 0x0030 (---AD---) Unix security: uid: 0 (root) gid: 0 mode: 0777 (rwxrwxrwx) NTFS security descriptor: Owner: BUILTIN\Administrators Group: BUILTIN\Administrators DACL: Allow - DEMO\nasuser1 - 0x001f01ff (Full Control) - OI|CI
2. 打開secedit工具
3. 點選ADD,在跳出的界面内輸入你要的修改權限的檔案夾的路徑
4. 點選OK,然後添加你想要的使用者/組,和權限
5. 點選OK,确認就行
6. 回到主界面點選'save unicode',然後會在這個工具所在的目錄下生成一個untitled檔案,把這個檔案改名為security.conf,把這個檔案放到 \\名稱\etc$ 目錄下,如果已有這個檔案就改名,例如security_test.conf。
7. 在指令行輸入以下指令,這裡的-C是檢查,不正式執行:
Netapp-1> fsecurity apply /etc/security_test.conf -c
Definition validated successfully.
8. 然後去掉-C,正式執行指令運作:
Netapp-1> fsecurity apply /etc/security_test.conf
Added security job 1015.
9. 再運作最初的指令檢視權限:
Allow - Everyone - 0x001f01ff (Full Control) Allow - Everyone - 0x10000000 - OI|CI|IO
再到windows裡就可以看到權限已經被修改成everyone了
本文轉自 川流資訊 51CTO部落格,原文連結:http://blog.51cto.com/tech4fei/1930078