Re: Settings NTFS Permissions
- From: stephen <stephen@xxxxxxxxxxxxxxx>
- Date: Wed, 20 Dec 2006 22:09:15 +0000
Wes wrote:
Many thanks for the link but that not what I am after.
I have hundereds of folders that contain the same directory tree:
\folder1 to say folder100 with each one containing say 10 subfolders labelled subfolder1 to 10, which in turn contains multiple subfolders. I have simplified it here, there are many more folders and levels.
I want to apply specific permissions to subfolder1 in every folder1 to 100 and I would prefer not to have do it manually. I do not want to change the permissions of any of the parent folders or other subfolders of the parent (hope that makes sense.)
Any suggestions?
Kind regards,
Wes
"Hakan GOKCOL" <hgokcol@xxxxxxxxxxx> wrote in message news:82AB3816-75A8-43CC-8EE6-9201626F6C61@xxxxxxxxxxxxxxxx
http://support.microsoft.com/kb/313398
Please check this link.
Hakan GOKCOL
"Wes" <weskjc@xxxxxxxxxxxxxxxxxxx> wrote in message news:e3q9tEGJHHA.4112@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have an SBS 2003 server with a shared data folder containing hundreds of
folders of the same name.
\data
\folder1\
\subfolder1
\subfolder2
\folder2\
\subfolder1
\subfolder2
I need to apply the same NTFS permissions (not inherited from parent) to
each \subfolder2 in the directory tree but I don't want to do this one by
one. I have been looking at the XCacls.exe tool but can't seem to get it to do what I want.
Does anyone know if this can be acheived if so, how?
I have had a look at xcacls.exe and xcacls.vbs but neither seem to offer the control you want on their own. I am familiar with UNIX command line tools, and the UNIX find command can be used to select just the exact folders you want. You can install Cygwin on your server to get use of these utilities without risk.
Here's an example from within the cygwin command window, $ is the command prompt, # lines are my comments:
# changes directory to C:\data
$ cd /cygdrive/C/data
# find on its own just lists all files and folders recursively
$ find
..
../folder1
../folder1/subfolder1
../folder1/subfolder1/subfolder1
../folder1/subfolder1/subfolder2
../folder1/subfolder2
../folder1/subfolder2/subsubfolder1
../folder1/subfolder2/subsubfolder2
../folder2
../folder2/subfolder1
../folder2/subfolder2
../folder2/subfolder2/subfolder1
../folder2/subfolder2/subsubfolder2
../folder2/subfolder2/subsubfolder3
# finds all files or folders named subfolder1
$ find . -name subfolder1
../folder1/subfolder1
../folder1/subfolder1/subfolder1
../folder2/subfolder1
../folder2/subfolder2/subfolder1
# now restricted in depth to one subfolder
$ find . -maxdepth 2 -name subfolder1
../folder1/subfolder1
../folder2/subfolder1
# only match directories (folders) not any other file type
$ find . -maxdepth 2 -name subfolder1 -type d
../folder1/subfolder1
../folder2/subfolder1
# Now run xcacls (mine is in C:\xcacls) on these files
# {} is a placeholder for the filename, the \; terminates the command
$ find . -maxdepth 2 -name subfolder1 -type d -exec /cygdrive/C/xcacls {} \;
c:\data\folder1\subfolder1 Everyone:(OI)(IO)F
Everyone:(CI)F
c:\data\folder2\subfolder1 Everyone:(OI)(IO)F
Everyone:(CI)F
# now change permissions to R
$ find . -maxdepth 2 -name subfolder1 -type d -exec /cygdrive/C/xcacls {} /E /Y /G everyone:R \;
processed directory: c:\data\folder1\subfolder1
processed directory: c:\data\folder2\subfolder1
# display results
$ find . -maxdepth 2 -name subfolder1 -type d -exec /cygdrive/C/xcacls {} \;
c:\data\folder1\subfolder1 Everyone:(OI)(IO)R
Everyone:(CI)R
c:\data\folder2\subfolder1 Everyone:(OI)(IO)R
Everyone:(CI)R
-- stephen
.
- Follow-Ups:
- Re: Settings NTFS Permissions
- From: Wes
- Re: Settings NTFS Permissions
- References:
- Settings NTFS Permissions
- From: Wes
- Re: Settings NTFS Permissions
- From: Hakan GOKCOL
- Re: Settings NTFS Permissions
- From: Wes
- Settings NTFS Permissions
- Prev by Date: Re: Host Multiple Excahnge Servers with single external IP
- Next by Date: RE: ISA Server Error
- Previous by thread: Re: Settings NTFS Permissions
- Next by thread: Re: Settings NTFS Permissions
- Index(es):
Relevant Pages
|