You don’t have permission …

If, like me, you’ve turned off ‘User Account Control’ to avoid those seriously annoying screens, you may occasionally be denied permission to delete or rename a file you’ve created 2 nano-seconds beforehand (microsoft nan0-seconds of course). To avoid having to turn on ‘User Account Control’ ; reboot; delete the file ; turn off  ‘User Account Control’ and re-reboot … the following may prove useful. As usual, open a command shell (you to have administrator privileges) and type :

> takeown /f  $DRIVE:/$FILE.$EXT /* e.g. > takeown /f  C:/legal_music.mp3 */

> icacls $FILE.$EXT /grant $YOU:F /* e.g. > icacls C:/legal_music.mp3 /grant my_name:F */

/* it may be easier to move to the correct drive and cd to the correct directory to avoid typing a full pathname twice */

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: