icacls 使文件夹只读

cos*_*son 0 icacls

我只是在学习 icacls 来设置文件夹的权限。更好的是,我想确保文件夹是只读的。谁有想法?

C:>icacls.exe C:\TEMP\Reports [开关]

Zor*_*che 6

也许是这样的?尝试搜索该站点,有很多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
Run Code Online (Sandbox Code Playgroud)