What permissions do I need to move a folder?
Posted
by
isme
on Server Fault
See other posts from Server Fault
or by isme
Published on 2012-07-01T13:03:06Z
Indexed on
2012/07/01
15:17 UTC
Read the original article
Hit count: 252
windows-7
|permissions
In the root of my drive there exists a folder called SourceControl
that contains all the working copies of all my programming projects.
I would like to move the folder to my user directory (\Users\Me
), but something about the permissions on the folder forbids me. I don't remember how I created the folder.
When I execute the move command:
MOVE \SourceControl \Users\Me
I receive the following error:
Access is denied.
I have resolved a similar problem in the past using the Takeown
utility to assign ownership of the file to me, so I tried this command next:
TAKEOWN /F \SourceControl
It returns the following error:
ERROR: The current logged on user does not have ownership privileges
on the file (or folder) "C:\SourceControl".
I've just learned about the Icacls utility, which can inspect and modify file permissions.
I used this command to inspect the permissions on the folder:
ICACLS \SourceControl
It produced this list:
\SourceControl BUILTIN\Administrators:(I)(F)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(M)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)
I think this means that normal user accounts, like mine, have permission only to read and execute (RX
) here, while administrator accounts have full control (F
).
I used Icacls to confer full control of the directory to my user account with this command:
ICACLS \SourceControl /grant:r Me:F
The command produces this output:
processed file: \SourceControl
Successfully processed 1 files; Failed processing 0 files
Now inspection of the permissions produces this output:
\SourceControl Domain\Me:(F)
BUILTIN\Administrators:(I)(F)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(M)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)
But after this the move command still fails with the same error.
Is it possible to move this folder without invoking administrator rights? If not, how should I do it as administrator?
© Server Fault or respective owner