BusyByte

ICT and Digital Technologies Education, Business Analysis

Windows 7 Changing permissions on multiple files

I got a i7 based computer recently from Dell mainly because it was on special (30% off) and it looked pretty. It seemed like a great deal. And it was. Anyway it came with Windows 7 Professional  and after I copied all my files from my old XP PC to my new one from one of my backups I kept getting problems where when I accessed a file it would complain I did not have the necessary permissions to use it.

I tried setting permissions on folders and using inheritance to fix the files but for some reason that did not work. Windows 7 and also Vista apparently will not allow you to set permissions on multiple files at once – though Windows XP did. I have never noticed it at work I think because everything is controlled at the domain level and anyway I usually have Admin rights anyway, being the IT Guru wherever I work. I prefer Guru to some of the other terms I have heard over the years from various bosses and the like :-).

So after the obligatory Google to find out how to do it it appears that we are stuck with it – if you want to use the GUI any way. The only way to fix it seems to be by the command line tool CACLS well actually its newish cousin iCACLS.

The wonderful website ss64.com has the command syntax here.  SS64  is an awesome website for those of us who have to administer multiple servers across various operating systems as it lists command line references for most common commands used in Windows (cmd, Powershell, vbscript), linux (bash) and OSX. It will also tell you usually the equivalent command to use in bash if you know its name in windows and vice versa which is completely awesome.

So anyway back to file permissions. In lnux you use chown and chmod to do this. In Windows this used to be done mosly in the Security tab when you right clicked on the properties of a file or folder. But in W7 and Vista no longer for a group of files.

So iCACLS comes in to play. You need to open a command prompt – preferably Run as Administrator (right click on cmd.exe after searching in the menu to do this).  Once there navigate with cd to the correct directory.

Then to give yourself say Full control over a all of a group of files type this;

icalcs *.* /grant username:F 

*.* refers to ALL files in the path.

Add /T if you want to do all file and subdirectories in below the path.

icalcs *.* /grant username:F /T

The command line is not really that scary now is it?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.