Problem with Changing Access Control of a directory


New Member
In order to make one of my directory secure, I changed the access control of the directory to none using the command
cacls DirName /e /p everyone:n

But when I tried to grant the full access using
cacls DirName /e /p everyone:f
, it gives me Access Denied Error. Also, I am unable to open the folder. Any help would be appreciated.



Windows Forum Team
Staff member
Set it back to full from an elevated command prompt


Windows Forum Team
Staff member
That is true, but if he's using cacls I would imagine he knows how. I looked at that guide, it's actually missing one of the easier ways to run anything as administrator. If you hold Shift + ctrl and left click your executable and it will run it as admin.

Cool! My thinking is we have a lot of visitors that log on the forum and don't post, but they do read the threads. My reply was for them.
I don't mean to step on you, but some times your replies are not always for a newbie.;)
I follow all your replies and you are very knowledgeable,:worship: but some times maybe you could make it a little more simple for the newbie users.
I'm just the opposite, I'm to windy.:rofl:


New Member
Hi @Neemobeer,
Thanks for the help. But that didn't worked because I was executing the commands in elevated cmd.
Below is the screenshot of what I ran:

@holdum333 being a web developer I know a bit about those shits :p


Windows Forum Team
Staff member
Try taking ownership of the folder first with takeown /F <directory> then try assigning permissions. If that doesn't work...
  • download psexec PsExec
  • Open an elevated command prompt in the directory psexec is
  • Type psexec -s -h -i cacls <pathtodirectory> /e /p administrators:f
This should use the SYSTEM account to assign full access to the administrators group


New Member
@Neemobeer Thanks,
Taking ownership worked. :)

@holdum333 Nobody's perfect. And that's why one should never hesitate in asking for help ;)

Thanks guys!

Good for you Vivek! I'm glad it worked out for you. @Neemobeer is my idol. I think he has 3 or 4 degrees and working on another one.
My advice about CMD was for the guests that read these threads, not for you. Come back often and share your knowledge here on the forum.
Thanks for your feed back. I'm sure @Neemobeer will be pleased that it worked out for you!:up:

:up: @Vivek Right back at you friend! Welcome to the forum!


Windows Forum Team
Staff member
I'll tell you straight up, I'm almost never offended or angry at anyone for any reason so don't feel like your stepping on toes. I have been drinking a bit, but I'll try to explain Windows ACL model a bit. Windows uses the DAC acl model which is Discretionary Access Control. This means that those who own a given file or directory can give any access to anyone. If you don't have any permissions you can still take ownership of a file or directory provided you are a member of the administrators group. Once you have ownership you can give access to yourself or anyone. Hopefully that clears up why taking ownership resolved this.

Hi friend! This is all above my pay grade. My question was is this any good? I have a couple drinks every night myself and I'm never offended or angry either. I glad to get all the help and suggestions I can get. I may not remember them, but some of it sticks to this old brain!:rofl:
Add "Take Ownership" to Explorer Right-Click Menu in Windows

Last edited:


Fantastic Member
Premium Supporter
Good thread here guys!

@neemo; nice concise explanation of DAC there.:D

<<<BIGBEARJEDI>>> :nerdie:

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.