Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 创建文件夹/文件并设置权限_Windows_Command Line_Command Prompt - Fatal编程技术网

Windows 创建文件夹/文件并设置权限

Windows 创建文件夹/文件并设置权限,windows,command-line,command-prompt,Windows,Command Line,Command Prompt,如何在XP中从命令行创建文件夹/文件,然后允许所有人都拥有权限?我尝试从属性中取消选择只读,但当我再次打开该文件夹/文件的属性时,它始终是只读的 您必须使用“CACLS”。 使用CACLS/help获取文档。 这里有两个例子: 授予用户“user1”对目录的完全权限 CACLS c:\directory /E /T /C /G "user1":F CACLS c:\directory\*.* /E /T /C /G "user1":F 将目录内容的完全权限授予用户“user1” CACLS

如何在XP中从命令行创建文件夹/文件,然后允许所有人都拥有权限?我尝试从属性中取消选择只读,但当我再次打开该文件夹/文件的属性时,它始终是只读的

您必须使用“CACLS”。
使用CACLS/help获取文档。
这里有两个例子:
授予用户“user1”对目录的完全权限

CACLS c:\directory /E /T /C /G "user1":F
CACLS c:\directory\*.* /E /T /C /G "user1":F 
将目录内容的完全权限授予用户“user1”

CACLS c:\directory /E /T /C /G "user1":F
CACLS c:\directory\*.* /E /T /C /G "user1":F 
CACLS/帮助:

NOTE: Cacls is now deprecated, please use Icacls.
要授予用户“user1”对目录的完全权限(Nicolas的示例):

这属于