I locked my file with the command code below

cacls "C:\Program Files (x86)\CrossTec\CrossTec Remote Control\Support" /E /P everyone:n

it locked, but when i tried to unlock it by changing the last n to an f or a y, it wouldn't unlock. instead, it gave me this:

NOTE: Cacls is now deprecated, please use Icacls.

Displays or modifies access control lists (ACLs) of files

CACLS filename [/T] [/M] [/L] [/S[:SDL]] [/E] [/C] [/G user:perm]

  [/R user [...]] [/[ user:perm [...], and a bunch of other messages

  HELP ME PLEASE

Recommended Answers

All 6 Replies

The command line help for cacls doesn't list 'y' as an option for permission settings. When an invalid parameter has been specified the help page is usually displayed. Although cacls is still distributed with Windows it is deprecated and you should be using icacls instead.

It's not immediately clear why you're unable to unlock the file or directory. Which user account owns the resource?

Have you tried resetting the ACLs? Try the following command:

icacls "C:\Program Files (x86)\CrossTec\CrossTec Remote Control\Support" /reset /T /C

There is this to read....
http://technet.microsoft.com/en-us/library/cc753525.aspx
Else you could just run this...
icacls "C:\Program Files (x86)\CrossTec\CrossTec Remote Control\Support" /grant everyone:f
But you must be an admin to run it successfully. Why? Because you took away everyone's permissions. If you are a User, then you have now no permission to modify permissions on that file.

Yes, and this is what popped up:

Successfully processed 0 files; Failed processing 2 files

What next?

You could download and burn a Linux LiveCD, boot from it, then copy the folder/files to a FAT32 partition. Then delete the original files and copy the copied folder/files back to their original locaion. That should kill the original ACLs (access control lists).

Yep, you can walk all over Microsoft's best efforts with Linux boots as RJ suggests (by ignoring and then removing all the file's metadata), else...
Perhaps we should replace the ACL you granted, so...
icacls "C:\Program Files (x86)\CrossTec\CrossTec Remote Control\Support" /grant:r everyone:f
If that fails then run this, and copy/paste here the result, please...
cacls "C:\Program Files (x86)\CrossTec\CrossTec Remote Control\Support"
Or maybe the same, but with icacls.

Log on as an administrator, take ownership of the file, then change its permissions.

Using a command prompt you could try the following:

takeown /F myfile.txt
icacls myfile.txt /grant Everyone:f

Note that permissions on a file or folder can be changed by its owner, regardless of any existing permissions. You'll need to log on as an administrator because other accounts don't usually have the right to take ownership.

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.