Start -execute
cmd
(Run As Administrator)
- Change location to the folder you need access to
e.g.:
E:
cd e:\OSL
- Type: takeown /F . /R /A /D Y > NUL
- Type: icacls . /grant Administrator:(OI)(CI)(F) /T /Q
- Type: icacls . /grant oscar:(OI)(CI)(F) /T /Q
Afterwards you will be able to change the access rights using cacls or xcacls.
http://programmerstools.hubpages.com/hub/xcacls
===========================
Unix/linux correspondance to windows
chmod is used to change access rights on files and folders for owner-group-others.
So chmod would correspond more to cacls.
And chown would correspond to takeown.
===========================
CACLS for windows XP
Elevation of privilege per script
Ownership of a file or folder
Denied permission to access folders
- click Start
- Type: cmd
- Right-click cmd when it appears
- Click Run As Administrator
- Change location to the folder you need access to (e.g. cd e:\folder)
- Type:
takeown /F . /R /A /D Y > NUL
- Type:
icacls . /grant Administrator:(OI)(CI)(F) /L /T /Q
(in other case use instead of Administrator your username - you will only have access from your
XP and Vista machine in this case)
[> is the character greater than without the ; character]
[It should be ""USER : ( O I )..." but without the spaces before and after : ]
(Or, replace USER (Administrator) with Users if you want anyone [on any computeryour hard drive is plugged into] to have full access to these files)
---------------------
other version:
I restored the primary [C:] hard drive from an old computer running
Windows XP to a new one as a secondary/additional hard drive on Windows
Vista, and got a "You have been denied permission to access this folder"
message.
Found this page via Google. Thank you, Jimmy Brush.
Code:
- Click Start
- Type: cmd
- Right-click cmd when it appears and select Run As Administrator.
- Change location to the folder you need access to (e.g. cd e:\folder).
- Type: takeown /F . /R /A /D Y > NUL
- Press the Enter key and wait for the command to complete.
- Type: icacls . /grant users:(OI)(CI)(F) /L /T /Q
- Press the Enter key.
iCACLS.exe (2003 sp2, Vista)
======================
CACLS: Capacidades de permisos de grupo
No comments:
Post a Comment