Yesterday I followed a thread trying to learn to lock file folders using the cacls in the command window. I thought I'd use the "E:\Virus Converter\Daily" file folder in my "E:" as my target,....actually that folder has huge contents.....folder size may be more than 56GB..... I was able to lock it, but now I can't unlock it.

Here is the code that I used to lock it:
E:\Virus Converter\Daily>cacls virus /e /p Everyone:n
then it showed...

processed dir E:virus

I could confirm that I was unable to access that folder......... So I then wanted to unlock the folder. I used the following code:

E:\Virus Converter\Daily>cacls virus /e /p Everyone:f

It returns : Access is denied.

i also tried all the above methods such as grant n all but it gave same results...

sir plzzzz help me....

Try

cacls virus /t /g Everyone:f

Removing the /e switch will replace the ACL instead of editing it, else try loading a WinPE env, and running CACLS from there

Here is something else to learn. Users with lower permissions can use cacls to restrict permissions, as you have so done, but that user cannot grant more relaxed permissions. As you have seen. To reverse what you have done, you will need to have an administration-rights account. And then it is as simple as entering th cmd that you tried.

Buddy it didn't worked :( .

as i typed the "cacls virus /t /g Everyone:f"
it asked "Are you sure (Y/N)" is did "y"
it gave "Access Denied"

Of course it did not work. The whole idea of acls is that low permissioned users cannot allow greater access to files and folders. That's called security at work. Get an administrator to make the change for you.
cacls does not care that it may have been YOU that removed the permission, it just is not going to allow a Guest or User grant full access to everyone. It's pretty much like the bank manager might let you slam the vault door, but he aint gunna let you have the key to open it.

So then what to do knw??

As Gerbil has suggested, use the administrator account to reverse it

you will need to have an administration-rights account

I think i em using the admin account.....
but still can you tell mw

To get to the command prompt as administrator go to start accessories and then right click Command prompt and select "Run as administrator" from the menu. Then try your unlock command again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.