无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 1344|回复: 4
打印 上一主题 下一主题

问问关于acl问题

[复制链接]
跳转到指定楼层
1#
发表于 2010-5-5 19:47:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
比如公司服务器设置了不同帐号,不同部门组
利用ntfs的权限设置不同文件夹为不同部门,不同用户访问权限。

如果重装系统以后再重新配置那么多文件夹那是很悲剧的,不知道有没有好用的gui工具或其它什么的可以解决这个问题?(这个问题郁闷很多年了)

2003 sp2后有一个小工具——icacls.exe 命令行不理想
2#
发表于 2010-5-5 20:32:26 | 只看该作者
这个应该很简单的吧,

不过至今net user命令没怎么研究,但是NTFS权限还是弄了很多次了


set cc=e:\w3\php
takeown /f %cc% /R /D Y
Xcacls.exe %cc% /t /c /g fdiy:r /Y
Xcacls.exe %cc% /t /e /c /g www:r /Y
net start apache2
net stop mysql

set dd=e:\w3\mysql
takeown /f %dd% /R /D Y
Xcacls.exe %dd% /t /c /g fdiy:r /Y
Xcacls.exe %dd% /t /e /c /g mysql:r /Y
Xcacls.exe %dd%\data /t /c /p fdiy:f /Y
Xcacls.exe %dd%\data /t /e /c /p mysql:c /Y
net start mysql
回复

使用道具 举报

3#
 楼主| 发表于 2010-5-5 21:12:20 | 只看该作者
要是有个能把整个分区的acl备份,然后重装系统的时候恢复就好了。
看来只能像你实现把所有的都写成批处理,然后。。。
我的目录是分
        a部门
  a同事  b同事 公用目录

有的目录是继承有的则是单独。上下级目录有的带读写有的只读有的全部权限。工作量还是大-_-!!
回复

使用道具 举报

4#
发表于 2010-5-5 23:58:17 | 只看该作者
http://setacl.sourceforge.net/html/examples.html

http://www.bog.no/index.php?option=com_content&view=article&id=2:how-to-backup-ntfs-acl

Written by Administrator   
Friday, 26 February 2010 12:42
Copy/backup/document ACL with SetACL.exeThis method works when you just want to copy ACLs without the hole file. It seems like xcopy just works with the hole file, and Robocopy doesn't work over shares. At least I haven't got it working...

Download SetACL from setacl.sf.net and put it in a folder that is in your PATH (eg. /windows/system32)

SetACL.exe -on "\\server1\share" -ot file -actn list -lst "f:sddl;w:d,s,o,g" -rec cont -bckp "f:\setacl-liste.txt"

Creates a complete listing of DACL, SACL, owner and primary group in SDDL format of the directory '\\server1\share1\users' and all sub-folders. The listing is stored in unicode format in the file specified.

When you need to copy this ACLs to another server:

Open f:\setacl-liste.txt > "Replace All" from Server1 to Server2 and do a restore from the new file.

SetACL.exe -on "dummy entry" -ot file -actn restore -bckp "f:\setacl-liste-srv01.txt"

Restores all (!) security descriptor data (DACL, SACL, owner, primary group) from the backup file to its original location.

BEWARE: If you have the appropriate user rights (usually, being a member of the administrators group on the target system is sufficient) ALL data in the security descriptor is overwritten!

Comment: Only data contained in the backup file is overwritten, ie. if you create a backup of the SACL only, when you restore it, the DACL, owner and primary group are left unchanged!



Last Updated on Friday, 30 April 2010 13:31
回复

使用道具 举报

5#
 楼主| 发表于 2010-5-6 12:53:38 | 只看该作者
原帖由 dato 于 2010-5-5 23:58 发表
http://setacl.sourceforge.net/html/examples.html

http://www.bog.no/index.php?option=com_content&view=article&id=2:how-to-backup-ntfs-acl

Written by Administrator    Friday, 26 February 2010 ...


谢谢,看样子不错。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2026-3-4 03:04

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表