Icacls

icacls 使文件夾只讀

  • February 1, 2012

我只是在學習 icacls 來設置文件夾的權限。更好的是,我想確保一個文件夾是只讀的。有人有想法麼?

C:>icacls.exe C:\TEMP\Reports

$$ switches $$

大概是這樣的?嘗試搜尋該站點,有很多icacls 範例

REM take ownership and reset permissions
TAKEOWN /f "C:\TEMP\Reports" /r /d y
ICACLS "C:\TEMP\Reports" /reset /T
REM grant full control to administrators, read only to everyone else
ICACLS "C:\TEMP\Reports" /grant:r "BUILTIN\ADMINISTRATORS":(OI)(CI)F ^
                        /grant:r "BUILTIN\EVERYONE":(OI)(CI)R ^
REM set inheritance on everything below
ICACLS "C:\TEMP\Reports" /inheritance:r

引用自:https://serverfault.com/questions/355633