9 Users Commented In This Post

Subscribe To This Post Comment Rss Or TrackBack URL
Tobey says, February 5th, 2007   

Or you can just restrict access to those folders. But that’s less effective of course.

Luke says, February 6th, 2007   

How about:

cacls FOLDER /R USER

This will prevent USER from ever accessing FOLDER. Alternatively you can do:

cacls FOLDER /G Administrator:F

This will overwrite the default settings and make Administrator the only user allowed to touch it.

Martin says, February 6th, 2007   

This is pretty nice Luke, where did you find the information ?

Luke says, February 6th, 2007   

I think I found this when I was trying to set up private folders on a WinXP Home box. The home edition does not have the permissions tab in the file properties dialog, so the only way you can set file permissions for individual users is via cacls.

Not sure where I found it exactly, but one of the best websites that explain all the windows command line commands is http://www.ss64.com/nt/

They cover all the build in stuff, as well as a lot of the stuff that comes in different Microsoft administrator kits and etc.

Shyborg says, February 8th, 2007   

Hey! LUKE.. How can we undo the process???? i cant even access to my folder. wtf..

Shyborg says, February 8th, 2007   

i used this command line “cacls FOLDER /G Administrator:F” then it locked my whole folder and now how should i Unlock it? I dont have any idea!

Martin says, February 8th, 2007   

not sure but it could be cacls Folder /P User:F

Luke says, February 8th, 2007   

Shyborg, you would have to restore privledges for yourself - for example:

cacls FOLDER /E /G Shyborg:F

The /E switch means that you are editing the privs - not replacing them. If you are a part of a domain you may need to do:

cacls FOLDER /E /G DOMAIN\Shyborg:F

Best way to do this is to look at another folder’s permissions and then replicate them on tour secret folder:

cacls OTHER_FOLDER

See which users have what permisions and just restore them using separate cacls commands. Don’t forget to use /E every time.

Good documentation of cacls is here: http://www.ss64.com/nt/cacls.html

Ranjith says, May 13th, 2007   

Nice stuff, thanx

Leave Your Comments Below
Hello, please leave your thought below

Please Note: Each comment will be manually approved by an admin. There is no guarantee that a comment will be posted. Please do not submit the comment multiple times.