Windows Server 2000/2003 Thread, Inherit Permissions setting via cmd in Technical; Hi,
I've come in this morning and realised that some changes i made over the holiday haven't worked quite as ...
20th April 2009, 10:22 AM #1
Inherit Permissions setting via cmd
I've come in this morning and realised that some changes i made over the holiday haven't worked quite as i hoped. I now need a way to take ownership of files and folders, then set them to inherit their permissions from above.
I've figured out how to take ownership with the takeown command, but can't find a way to set the inherit permissions setting on them without doing it manually! Is there a command i can run that will set this? I really don't want to have to do it manually!?!
I will need to script this so that it does it for every user, but only certain folders are affected.... (Application Data, Desktop)
Anyone know how i can do this?
IDG Tech News
20th April 2009, 12:56 PM #2
I figured it out
I used to take ownership of the folders/files
to set the inherit setting.
xcacls.vbs "Application Data" /I Enable /T
test.txt contained all the staff usernames, and it was the Application Data folder that needed modifying.
for /F %%g IN (test.txt) DO (
@echo Doing %%g
takeown /F * /R
@echo Owned %%g
xcacls.vbs "Application Data" /I Enable /T /F
@echo Done %%g
It also echoes the progress at various stages.
It's probably not perfect but it worked
Last edited by bmdixon; 20th April 2009 at 02:26 PM.
Reason: missed option from xcacls
By cookie_monster in forum Windows
Last Post: 28th May 2010, 12:53 PM
By TheWhiteWiltord in forum Windows
Last Post: 27th January 2009, 01:42 PM
By FatBoy in forum Scripts
Last Post: 17th October 2008, 04:34 PM
By localzuk in forum Windows
Last Post: 8th January 2007, 05:23 PM
Last Post: 23rd November 2006, 10:33 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread