Advertisement

04.13.2007 at 10:58AM PDT, ID: 22510275
[x]
Attachment Details

reset ownership and permissions in a batch file

Asked by durcom in Security Utilities, Windows XP Operating System, Windows Network Security Questions

Tags: reset, file, permissions, batch, ownership

Having an interesting issue with permissions
and windows XP Pro...

Basically I have a windows XP PRO box with NTFS
and some shares defined that I use to back up stuff
to from workstations over the network. (workgroup
only, NO domain...all users set up as administrators)

was playing with syncback SE...I selected an
option to "back up NTFS security"...

backup worked fine...

however, since the user on the local machine
is not defined on the XP PRO backup box,
when I try to access the backed up files on
the network share, I get an "access denied" error...
because the network user has no rights to the
backed up files...

I can fix the problem intereactively by going to the XP Pro box,
and taking ownership of the folder/files and resetting
the permissions...

I would like to prevent this from happening at all
if possible (different question already submitted
about that), but if that is not possible, I  will probably run a batch
file each night to reset the owner and permissions
on the shared backup folders...

I experimented with subinacl but the documentation
sucks....(what is the difference between /owner=
and /setowner=???)  also it doesn't seem to
support the "inherited" permssions ability...

so, to save some time was wondering, if someone
could tell me how, using subinacl or something else, how I would
reset all files/folders below a particular shared folder
to a "pristine" state?

(ie reset the owner on all files/subdirs below a folder
to  group "administrators" and/or a particular user, and
blow away all existing (undefined users) access permissions and auditing permissions
(/perm? /audit?) and replace with just the "inherited permissions"
from the folder above (the share folder-which is not changed by the backup)?

since there are some large trees involved, speed
and efficiency are also important.
Start Free Trial
[+][-]04.13.2007 at 11:04AM PDT, ID: 18907426

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 11:11AM PDT, ID: 18907476

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 11:19AM PDT, ID: 18907533

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 11:55AM PDT, ID: 18907749

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 12:09PM PDT, ID: 18907832

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Security Utilities, Windows XP Operating System, Windows Network Security Questions
Tags: reset, file, permissions, batch, ownership
Sign Up Now!
Solution Provided By: Bartender_1
Participating Experts: 1
Solution Grade: B
 
 
[+][-]04.13.2007 at 12:15PM PDT, ID: 18907866

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 01:08PM PDT, ID: 18908219

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.16.2007 at 07:51PM PDT, ID: 18922073

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32