联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off rem 共享F盘 net share test=F:\ rem 对everyone用户添加full contorl权限 cacls F:\ /g everyone:f /e
C:\>cacls /? Displays or modifies access control lists (ACLs) of files CACLS filename ] ] ] filename Displays ACLs. /T Changes ACLs of specified files in the current directory and all subdirectories. /E Edit ACL instead of replacing it. /C Continue on access denied errors. /G user:perm Grant specified user access rights. Perm can be: R Read W Write C Change (write) F Full control /R user Revoke specified user's access rights (only valid with /E). /P user:perm Replace specified user's access rights. Perm can be: N None R Read W Write C Change (write) F Full control /D user Deny specified user access. Wildcards can be used to specify more that one file in a command. You can specify more than one user in a command. Abbreviations: CI - Container Inherit. The ACE will be inherited by directories. OI - Object Inherit. The ACE will be inherited by files. IO - Inherit Only. The ACE does not apply to the current file/directory.
@echo off rem 删除原来的共享 net share F:\ /delete rem 共享F盘 net share test=F:\ rem 对everyone用户添加full contorl权限 cacls F:\ /g everyone:f /e