fixing folder permissions

B

Brian

I am trying to use robocopy to fix a mistake that happened when I moved
folders and files from one partition to another. I cut and pasted the
folders, but didn't realize I would lose security settings when moving
across partitions. So I would like to restore the security settings for the
folders. Here is an abbreviated version of my folder structure


Projects

0402002 - AET Environmental

Accounting

Operations

Sales

Etc.

0402003 - Next Project

Accounting

Operations

Sales

Etc.


The folder Projects has no inheritance set for permissions, and allows Full
Access to Domain Admins, and read access to Domain Users. Those two
permissions flow all the way through the directory structure. Accounting,
Operations, Sales, and all other departments have Full Access permissions
set specifically on their respective folder.

I can create an empty project template folder structure with the proper
permissions (the "template folder" in the command line above), and use
/secfix to copy the proper permissions to the Accounting, Operations, ...
folders. However, the existing files and folders under each project folder
to not automatically inherit the security settings that robocopy recreated.
New files inherit the security settings as they are supposed to.

I seem to need a way to "trigger" the files to reset their inheritance. Is
there a way to do what I need to do?
Thanks,
Brian
 
S

Steven L Umbach

Look at the fileacl utility. It has the /inherit option to force propagation from
upper levels. Just be sure to have a full backup and try it out with a "test run"
first as rarely does one get it right the first time they [including me] use a new
command line tool. Fileacl also has options for /files and /sub for
ubdirectories. --- Steve

http://membres.lycos.fr/jfb/gb/gbtools/fileacl.htm
 
B

Brian

Thanks, that sounds promising. I've been tinkering with an idea that might
work as well. Since permissions are recreated when you copy files, I could
batch create new project folders with empty subdirectories (using my
template), and then just copy the entire folder structure into the empty
one, and voila! All the securities are reset. It's worked well in my test
environment. And I don't have to risk messing things up with a command line
tool I don't understand 100%. =)

Thanks again,
Brian

Steven L Umbach said:
Look at the fileacl utility. It has the /inherit option to force propagation from
upper levels. Just be sure to have a full backup and try it out with a "test run"
first as rarely does one get it right the first time they [including me] use a new
command line tool. Fileacl also has options for /files and /sub for
ubdirectories. --- Steve

http://membres.lycos.fr/jfb/gb/gbtools/fileacl.htm

Brian said:
I am trying to use robocopy to fix a mistake that happened when I moved
folders and files from one partition to another. I cut and pasted the
folders, but didn't realize I would lose security settings when moving
across partitions. So I would like to restore the security settings for the
folders. Here is an abbreviated version of my folder structure


Projects

0402002 - AET Environmental

Accounting

Operations

Sales

Etc.

0402003 - Next Project

Accounting

Operations

Sales

Etc.


The folder Projects has no inheritance set for permissions, and allows Full
Access to Domain Admins, and read access to Domain Users. Those two
permissions flow all the way through the directory structure. Accounting,
Operations, Sales, and all other departments have Full Access permissions
set specifically on their respective folder.

I can create an empty project template folder structure with the proper
permissions (the "template folder" in the command line above), and use
/secfix to copy the proper permissions to the Accounting, Operations, ....
folders. However, the existing files and folders under each project folder
to not automatically inherit the security settings that robocopy recreated.
New files inherit the security settings as they are supposed to.

I seem to need a way to "trigger" the files to reset their inheritance. Is
there a way to do what I need to do?
Thanks,
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top