Originally posted by plp626 at 2009-9-13 03:17:
难道我的要求是矛盾的?!
应该不矛盾,把目录与文件分开设置权限就行了。
xcacls我是不会用啦,我用setAcl
缺点是第2点"剪切到"无法实现。
说明:其中D:\test是要得到目录的父目录,target就是要得到的目录。
相关帖子:http://bbs.bathome.cn/thread-3670-1-1.html
set "sup_dir=D:\test"
set "tar_dir=%sup_dir%\target"
md "%tar_dir%"
SetACL.exe -on "%sup_dir%" -ot file^
-actn clear -clr "dacl,sacl"^
-actn ace -ace "n:everyone;p:list_dir;i:sc;m:set"^
-actn setprot -op "dacl:p_nc;sacl:p_nc"
SetACL.exe -on "%tar_dir%" -ot file^
-actn clear -clr "dacl,sacl"^
-actn ace -ace "n:everyone;p:list_dir,del_child,read_ea;i:sc,so;m:set"^
-ace "n:everyone;p:add_file,add_subdir;i:sc;m:grant"
原来了,不过还是留着罢,就不删了。
Last edited by wxcute on 2009-9-18 at 07:54 ]
Originally posted by plp626 at 2009-9-13 03:17:
Is my requirement contradictory?!
It should not be contradictory. Just set permissions for directories and files separately.
I don't know how to use xcacls, I use setAcl
The shortcoming is that the second point "cut to" cannot be implemented.
Explanation: Among them, D:\test is the parent directory of the directory to be obtained, and target is the directory to be obtained.
Related post: http://bbs.bathome.cn/thread-3670-1-1.html
set "sup_dir=D:\test"
set "tar_dir=%sup_dir%\target"
md "%tar_dir%"
SetACL.exe -on "%sup_dir%" -ot file^
-actn clear -clr "dacl,sacl"^
-actn ace -ace "n:everyone;p:list_dir;i:sc;m:set"^
-actn setprot -op "dacl:p_nc;sacl:p_nc"
SetACL.exe -on "%tar_dir%" -ot file^
-actn clear -clr "dacl,sacl"^
-actn ace -ace "n:everyone;p:list_dir,del_child,read_ea;i:sc,so;m:set"^
-ace "n:everyone;p:add_file,add_subdir;i:sc;m:grant"
Originally , but still keep it, so I won't delete it.
Last edited by wxcute on 2009-9-18 at 07:54 ]