China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-05 10:23
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Modify folder access permissions using CMD??? View 2,453 Replies 7
Original Poster Posted 2006-10-08 02:08 ·  中国 湖南 株洲 电信
初级用户
★★
Credits 135
Posts 54
Joined 2006-09-10 03:07
19-year member
UID 62265
Status Offline
If a file like 1.exe, 2.exe, 3.exe is created in the system, how to use CMD to make these folders inaccessible, including the super user

[ Last edited by utem999 on 2006-10-8 at 06:20 ]
Floor 2 Posted 2006-10-08 04:54 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by utem999 at 2006-10-8 02:08:
If files like 1.exe, 2.exe, 3.exe are created in the system
How to use CMD to make these folders inaccessible
Including the super user


“There are files like 1.exe, 2.exe, 3.exe created in the system” is contradictory to “use CMD to make these folders inaccessible”. Please make the problem clearer, the LZ.
In addition, the topic is relatively vague. It is recommended to modify the topic, such as:
“Use CMD to modify folder access permissions” and so on...
Floor 3 Posted 2006-10-08 04:58 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
Permissions settings should probably use xcacls.

LZ, refer to this webpage and take a look, I haven't studied it.

http://www.2mysite.net/blogview.asp?logID=648
Floor 4 Posted 2006-10-08 06:22 ·  中国 湖南 株洲 电信
初级用户
★★
Credits 135
Posts 54
Joined 2006-09-10 03:07
19-year member
UID 62265
Status Offline
Originally posted by utem999 at 2006-10-8 02:08:
If files like 1.exe, 2.exe, 3.exe are created in the system
How to use CMD to make these folders inaccessible
Including the super user

[ Last edited by utem999 on 2006-10-8 at 06:20 ]

First create the file
Then set the access permissions
Floor 5 Posted 2006-10-08 06:49 ·  中国 浙江 衢州 电信
银牌会员
★★★
Credits 1,270
Posts 548
Joined 2004-05-31 00:00
22-year member
UID 25754
Gender Male
Status Offline
If it is an NTFS partition, only the system user can access it, and even the administrator account cannot access it.
Floor 6 Posted 2006-10-08 07:43 ·  中国 湖南 株洲 电信
初级用户
★★
Credits 135
Posts 54
Joined 2006-09-10 03:07
19-year member
UID 62265
Status Offline
Originally posted by utem999 at 2006-10-8 06:22:

First create the file
Then set access permissions

It is an NTFS partition
Floor 7 Posted 2007-07-09 00:33 ·  中国 甘肃 兰州 电信
初级用户
Credits 26
Posts 14
Joined 2007-07-07 22:54
19-year member
UID 93416
Gender Male
Status Offline
If it is 1.exe, you can use:
cacls 1.exe /e /t /r "Administrators"
cacls 1.exe /e /t /r "Administrator"
cacls 1.exe /e /t /r "users"
cacls 1.exe /e /t /r "system"
cacls 1.exe /e /t /r "everyone"

If there are other users on your machine, you can also use the same method to add users who are not allowed to access
Floor 8 Posted 2007-07-28 15:42 ·  中国 北京 鹏博士BGP
初级用户
Credits 126
Posts 47
Joined 2007-07-02 17:00
19-year member
UID 92952
Gender Male
Status Offline
Let's see, the original text is in Chinese but the content after is a batch command. The translated text would be:

See if this works
echo y|cacls "path\1.exe" /d everyone
echo y|cacls "path\2.exe" /d everyone
echo y|cacls "path\3.exe" /d everyone
Forum Jump: