Re: Script to check individual permissions
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Mon, 23 Oct 2006 22:42:21 +1000
This is making it a little clearer. You can try this batch file.
Watch out for wrapping lines - the "for" loop has only two
lines of code!
@echo off
set source=d:\Shares
set target=c:\Permissions.txt
set User=PeterV
echo Compiling a directory listing
dir /b /ad /s "%source%" > c:\dir.txt
echo Permissions listed on %date% at %time:~0,5% > %target%
echo ======================================================= >> %target%
for /F "tokens=*" %%* in (c:\dir.txt) do (
echo Processing %%*
cacls "%%*" | find /i "%User%" > c:\temp.txt && (echo %%* >>
%target% & type c:\temp.txt >> %target%)
)
notepad %target%
"PV" <PV@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0680AE60-F674-4D53-AC2C-B0C66F916C13@xxxxxxxxxxxxxxxx
okay, I am not being clear about my problem.looking
I want to clean up the permissions on my fileserver. I notice that some
folder-permissions are set to individual users instead of to a group.
So I am looking for a script that checks all folders for permissions, but
only displays that folders with permissions set to individual users.
PV
"Pegasus (MVP)" wrote:
Just use cacls by iteslf!
cacls "d:\Shares\Some Folder\Some File.doc"
"PV" <PV@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:38318E80-5457-414E-B860-C0BCFA0E8922@xxxxxxxxxxxxxxxx
Pegasus, thanks for your reply
That does give a better ouput than the subinacl-script
However this lists every file permission on a folder, where I was
permissionsonly for individual file permissions.
Do you know if that is possible too?
PV
"Pegasus (MVP)" wrote:
"PV" <PV@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0061CD49-BAD3-4691-B184-DF66CBFFC188@xxxxxxxxxxxxxxxx
Hi,
Does anyone know of a script that checks individual file
aon a
set of folders?/subdirectories
Whith subinacl you can list al folder permissions
( subinacl /noverbose /nostatistic /outputlog=C:\myfile.txt
C:\myfolder\ /display ), but as long as the permissions are set to
%target%group
I
don't care..
Thanks in advance
Peter
You could run this batch file:
@echo off
set source=d:\Shares
set target=c:\Permissions.txt
echo Compiling a directory listing
dir /b /ad /s "%source%" > c:\dir.txt
echo Permissions listed on %date% at %time:~0,5% > %target%
echo ======================================================= >>
for /F "tokens=*" %%* in (c:\dir.txt) do (
echo Processing %%*
cacls "%%*" >> %target%
)
notepad %target%
.
- Follow-Ups:
- References:
- Re: Script to check individual permissions
- From: Pegasus \(MVP\)
- Re: Script to check individual permissions
- From: Pegasus \(MVP\)
- Re: Script to check individual permissions
- From: PV
- Re: Script to check individual permissions
- Prev by Date: Re: Script to check individual permissions
- Next by Date: Re: Script to check individual permissions
- Previous by thread: Re: Script to check individual permissions
- Next by thread: Re: Script to check individual permissions
- Index(es):
Relevant Pages
|