开发者

Create folder/file and set permissions

开发者 https://www.devze.com 2023-02-05 00:26 出处:网络
How to in XP from command line create folder/file and after that allow everything to everyone permissions ? I tried from properties, I deselect readonly but when I open properties again fo开发者_Stack

How to in XP from command line create folder/file and after that allow everything to everyone permissions ? I tried from properties, I deselect readonly but when I open properties again fo开发者_StackOverflowr that folder/file it is always READONLY.


You have to use "CACLS".
Use CACLS /help to have the documentation.
Here 2 exemples:
To give the full right to the user "user1" to the directory

CACLS c:\directory /E /T /C /G "user1":F

To give the full right to the user "user1" to the content of the directory

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


CACLS /help:

NOTE: Cacls is now deprecated, please use Icacls.

To give the full right to the user "user1" to the directory (Nicolas' example converted):

Icacls c:\directory /T /C /grant "user1":F
0

精彩评论

暂无评论...
验证码 换一张
取 消