Re: Settings NTFS Permissions



Hi Stephen,

Things are looking hopeful.

I was playing with xcacls.exe not xcacls.vbs
(http://support.microsoft.com/default.aspx?scid=KB;EN-US;825751).

I have just done some basic testing and I have been able to add permissions
to each identically named folder in the tree. With some tweaking and
testing I think that I may be able to get it to work.

I haven't done anything with UNIX but I will take a look at your suggestion
of using Cygwin as well.

Many thanks,

Wes

"stephen" <stephen@xxxxxxxxxxxxxxx> wrote in message
news:ugmB5NIJHHA.4000@xxxxxxxxxxxxxxxxxxxxxxx
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


.



Relevant Pages

  • Re: system folders not shared?
    ... It is amazing how much can be accomplished at a command line. ... I still could not access XP's system folders. ... files would open across the network but media files would not). ... permissions to block the sharing of certain folders. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... The -ga command isn't a part of that beta version. ... permissions to the global assembly cache. ... Please review the steps in it, for creating a service account for an ASP.NET 2.0 application, ... I've also tried the aspnet_regiis thing as well as setting permissions on folders as described ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Set home directories
    ... steps (migrate almost 400 users home directories to a new server). ... permission and has a relatively easy set of command line tools. ... Use Security Explorer to set the permissions you want at the parent ... through the folders list and applies the permission for each at that level. ...
    (microsoft.public.scripting.wsh)
  • Re: Set home directories
    ... With regards to the way i setup permissions staff directories reside on ... permission and has a relatively easy set of command line tools. ... Generate a list of the folders to be permissioned - (you could use ... Use Security Explorer to set the permissions you want at the parent ...
    (microsoft.public.scripting.wsh)
  • Re: File Rights & Permissions
    ... > I reset some permissions on folders that corrupted some ... > of the security settings on files underneath the parent ... You could also try to use the same command to set the permission, ... folders that have a problem. ...
    (microsoft.public.win2000.security)

Loading