如何使用命令行更改远程计算机上的文件夹权限?

如何使用命令行更改远程计算机上的文件夹权限?

是否有任何 DOS 命令可用于更改远程计算机上文件夹的权限。感谢您的帮助。

谢谢。

答案1

看起来没有专门用于此的命令,但你可以使用icacls这种方式的命令来实现相同的效果

icacls \\Server_name\E$\test /grant:r "DOMAIN\%user%$":(OI)(CI)F

希望这对其他人有帮助

答案2

P:\>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I]
       [drive:][path][filename] [/S [/D] [/L]]

  +   Sets an attribute.
  -   Clears an attribute.
  R   Read-only file attribute.
  A   Archive file attribute.
  S   System file attribute.
  H   Hidden file attribute.
  I   Not content indexed file attribute.
  [drive:][path][filename]
      Specifies a file or files for attrib to process.
  /S  Processes matching files in the current folder
      and all subfolders.
  /D  Processes folders as well.
  /L  Work on the attributes of the Symbolic Link versus
      the target of the Symbolic Link

md test
attrib +A test

相关内容