On your Mac, select an item, then choose File Get Info. Click the lock icon to unlock it. Enter an administrator name and password. In the Sharing & Permissions section, do any of the following: Add a user or group: Click the Add button below the list, select a user or group, then click Select. Remove a user or group: Select the user or group, then click the Remove button below the list.
Locked files and Mac OS X | 31 comments | Create New Account
- Oct 24, 2019 Check the file’s lock status. Select the file, go to “File Get Info”. A checkbox labeled “Locked” will tell you the file’s current status. If the box is not greyed out, simply uncheck the box and try deleting the file again. If the box is greyed out it means you do not have the proper permissions for the file.
- Find the.plist file for the troublesome application and change its name by tacking the word old or something similar to the end of the filename. Then restart the application with its default preferences. Zap PRAM: Every Mac stores some basic info it needs in a small, separate memory called parameter RAM, or PRAM. To reset it, hold down the P.
- Feb 01, 2017 In this case we told find to look for the file flags of each file and it the flags matched the user immutable flag (uchg), dump it's path out to the list. User immutable means the owner of the file has made the file immutable (unchangeable) which is what happens when you check the Locked box in.
- On your Mac, select a disk, folder, or file, then choose File Get Info. If the information in Sharing & Permissions isn’t visible, click the disclosure triangle. Click the lock icon to unlock it. Enter an administrator name and password. Click a user or group in the Name column, then choose a privilege setting from the pop-up menu.
![Locked Locked](/uploads/1/2/6/4/126414480/238455046.png)
Click here to return to the 'Locked files and Mac OS X' hint |
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I've run into this same problem, where I couldn't delete a file because osX thought it was in use. If the file hasn't yet been moved to the trash, try to log into the terminal as root and use the rm command to delete it. Be careful that you're deleting the correct file, as by default rm does not ask for confirmation. You can use tab-completion to get osX to insert the filename for you. ie to delete a file called My File Is Locked, you could do this:
Make any sense? also, if your file is already in the trash, you can search for it with sherlock, and then drag the icon to the Terminal - it's full path wil pop up, allowing for easy deletion.
Be careful with rm!
rm 'My (then hit the tab key) ' (put an endquote in there also)
Make any sense? also, if your file is already in the trash, you can search for it with sherlock, and then drag the icon to the Terminal - it's full path wil pop up, allowing for easy deletion.
Be careful with rm!
that's not actually the case with locked files.
if the file is locked, then when you try to rm, even as root, it prompts
'override <permissions> for <filename>?'
hitting y for yes returns
'rm: <filename>: Operation not permitted'
and the file stays there.
if the file is locked, then when you try to rm, even as root, it prompts
'override <permissions> for <filename>?'
hitting y for yes returns
'rm: <filename>: Operation not permitted'
and the file stays there.
It is true that even as root via the Terminal you cannot use the usual UNIX 'rm' command to delete locked files. This is disturbing (especially unsettling to one who has done Mac troubleshooting for years and is well acquainted with Murphy's Law--if something can go wrong, it will). Suppose that by whatever cause, malicious or otherwise, you find your disks filled with hundreds or thousands of locked files. There should be some backdoor method (certainly, I agree, not one to be invoked casually) to unlock them in batch fashion (apart from rebooting into Mac OS 9.1; perhaps someday that won't be an option).
Well, after puzzling over this for some time, I finally discovered that backdoor method. You need to have the Developer Tools installed. Open a Terminal window and type (without the quotes)
'/Developer/Tools/SetFile a -l <names of files to unlock>' You can use wildcards. '/Developer/Tools/SetFile a -l *' for example will unlock all files in the current directory. If some are already unlocked, their lock attribute remains unchanged. Experienced UNIX hackers will no doubt be able to use shell scripts or more complicated command combinations to unlock in batch fashion any files anywhere.
Well, after puzzling over this for some time, I finally discovered that backdoor method. You need to have the Developer Tools installed. Open a Terminal window and type (without the quotes)
'/Developer/Tools/SetFile a -l <names of files to unlock>' You can use wildcards. '/Developer/Tools/SetFile a -l *' for example will unlock all files in the current directory. If some are already unlocked, their lock attribute remains unchanged. Experienced UNIX hackers will no doubt be able to use shell scripts or more complicated command combinations to unlock in batch fashion any files anywhere.
Correction: That should have been '/Developer/Tools/SetFile -a l <names of files>' and
'/Developer/Tools/SetFile -a l *'
I knew I shouldn't have stayed up this late. :-) Dynamic tag management user training manual.
Here's a simple bash script to run in a Terminal window Usage (code saved as an excutable file recursiveUnlock.sh): unlocks all files in dir, including those in dir's sub-directories'/Developer/Tools/SetFile -a l *'
I knew I shouldn't have stayed up this late. :-) Dynamic tag management user training manual.
---
sauy7
sauy7
$ find *the_root_dir* -type d -exec /Developer/Tools/SetFile -a l {} ;
To trash a locked file,I found the problem is hidden files. Hp printer c4795 software for mac. control
click on the folders that won't open and click on reveal to open folder.
Then unlock hidden file with GETINFO! Flash player software may be out of date mac 10.
click on the folders that won't open and click on reveal to open folder.
Then unlock hidden file with GETINFO! Flash player software may be out of date mac 10.
To trash a locked file,I found the problem is hidden files. control
click on the folders that won't open and click on reveal to open folder.
Then unlock hidden file with GETINFO!
click on the folders that won't open and click on reveal to open folder.
Then unlock hidden file with GETINFO!
I have tried almost every suggestion I have seen to delete a particular file. This file is on an external hard drive, it is locked and no matter what I do it will not go away. It is not a virus it is a fractal software program. I will take all the help I can get. Please be gentle I am new at this terminal window thing.
thanks
tolba
thanks
tolba
hit cmnd-I to launch the inspector and un-check the 'locked' checkbox for the offending file. I know this is slow but that's the purpose of locking a file.to prevent it from being casually deleted. With OS X we can prevent casual deletion with permissions so this is less of an now and locked files are a now a PITA. I agree, Apple should enable the option-empty trash combo for OS X.
Y
ps. do you know about shift-cmnd-delete then return shortcut in the finder to empty your trash? Better then nothing, but no option overrides are available that I know of
Y
ps. do you know about shift-cmnd-delete then return shortcut in the finder to empty your trash? Better then nothing, but no option overrides are available that I know of
Thanks! This worked like a charm. I have had this locked file on the desktop for months.
I don't mind unlocking files on an OS 9 volume using 'Get Info', but I find it really aggrivating to do this for a folder with more than five files. I frequently have thirty or more files that that are all locked, and it gets really annoying.
I used Terminal and did an ls -la, and saw the following:
The first file is not locked; the second file is. Notice the 'uchg' entry. How can I go through and remove this from all the files? I can't tell what kind of attribute this is.
--vb
I used Terminal and did an ls -la, and saw the following:
The first file is not locked; the second file is. Notice the 'uchg' entry. How can I go through and remove this from all the files? I can't tell what kind of attribute this is.
--vb
uchg is the 'user immutable' flag (ie, you can't delete it, as you've found). I know of two ways to clear this flag, either use (from a Terminal) the chflags command (see man chflags for info); the other, grab ChangeFileFolderProps to do this with a GUI.
I noticed I can select All of a group of files, get information, and it'll let you unlock everything selected. Had no idea it would do that.
Hope it does it tomorrow. Never can seem to predict what X will do, yet.
Hope it does it tomorrow. Never can seem to predict what X will do, yet.
I recently had the bad luck of running NAV 7 and it locked about 70 per cent of the files on my hard drive. This creates a real problem when the locked files are preferences or identities and such. I considered trying to write a script to unlock them but have selectively been unlocking them using the Get Info (CMD I). The trick to doing it fast is to sort the files in List View by Kind. Then select ALL the individual files in the list, deselecting any folders you accidentally select. Now press Command I and the Get Info Window will appear. If none of the files are locked the check box in the window will be empty. If all the files are locked the check box will be checked. If there is a mixture of locked and unlocked, a dash will be in the box. Click on the box to change them all to unlocked. (I don't know if there is a limit to the number of files you can open at once, but I have done a bunch.) Open the next folder and repeat.
This is the fastest method I have found. If anyone knows of an easier method or has written a script to go through a whole drive and unlock all the files, I would love to try it. Meanwhile no more Norton for me.
This is the fastest method I have found. If anyone knows of an easier method or has written a script to go through a whole drive and unlock all the files, I would love to try it. Meanwhile no more Norton for me.
I found a little freeware program called locker that will handel multiple files. Netflix app macbook. Works good for me.
http://www.vojousoftware.com/products.html
http://www.vojousoftware.com/products.html
There is also another way I discovered.
you can take any amount of files and in the stuffit pref just select delete original. then simply make and archive and delete it.
Hope it will work for you too.
you can take any amount of files and in the stuffit pref just select delete original. then simply make and archive and delete it.
Hope it will work for you too.
This is a great little program. I have OS 9 on a separate hard drive so booting into OS 9 didn't work and I'm terrified of the terminal. Thanks for your contribution!
Using other comments in this thread for reference, I managed to put together the following procedure for unlocking every file in a directory and all of its sub-directories. When a file is 'locked' by OS X, it is applying what *nix calls a 'flag' to the file. In this case, the flag is 'uchg', which means that no user, even root, can alter the file in any way until the flag is removed. You can use the command chflags to remove the flag. Microsoft word mac free reddit. The following example should unlock every file in your home directory: Here's a breakdown of the command:
Reason 8 mac crack. sudo will run the chflags command as root (you may be prompted for your root password).
-R will cause the command to affect every file in the directory and all of its subdirectories. Yes, capitalization matters.
nouchg is the syntax for removing the uchg flag. Any flag can be removed by putting 'no' in front of it.
Mac Identify Whaf App Has A File Locked Key
You can of course substitute the tilde (~) with whatever directory path you want to affect. To change an individual file, leave out the -R and type the file path instead of a directory path. Normal operators apply, such as $ and *.
To apply my above hint to items already in the trash, use: To empty the trash entirely, add a simple I'll bet someone who knew their applescript could write up a simple 'Force Empty Trash' menu item based on those two commands.
The utility 'BatCHmod' will let you drag any file, folder, or volume to it, and then let you unlock all items inside that item.
Hi,
you can easily unlock multiple files and folders using the terminal. Just follow the instructions :
http://docs.info.apple.com/article.html?artnum=106272
cheers
you can easily unlock multiple files and folders using the terminal. Just follow the instructions :
http://docs.info.apple.com/article.html?artnum=106272
cheers
Guys, guys, guys. There is a much easier way using the GUI in 10.4. Read on.
I don't mind using terminal sometimes, but let's face it why not use the GUI if possible?
Normally if you select multiple files and then to command I you'll get a ton of windows coming up and you'll have to individually unlock each file. Here's the magic. Hold down alt and command when you press 'I'. You now only get one window showing multiple file info, meaning one or two clicks to unlock all the files in one go. Another great thing is the mulitple file info window does not even need to be closed. Once you've finished in one folder simply move to the next and select more files.
I think this is what Absorber was trying to explain in his post. He missed out the vital step of using alt and command together though. You also don't need to go to list view, it works in any finder view.
I don't mind using terminal sometimes, but let's face it why not use the GUI if possible?
Normally if you select multiple files and then to command I you'll get a ton of windows coming up and you'll have to individually unlock each file. Here's the magic. Hold down alt and command when you press 'I'. You now only get one window showing multiple file info, meaning one or two clicks to unlock all the files in one go. Another great thing is the mulitple file info window does not even need to be closed. Once you've finished in one folder simply move to the next and select more files.
I think this is what Absorber was trying to explain in his post. He missed out the vital step of using alt and command together though. You also don't need to go to list view, it works in any finder view.
How I do it is as (after going through all the terminal scripts and other 'solutions')
If you cannot un-check the 'locked' check box when 'get info' is invoked (or if you can but you STILL have un-deletable files), then open trash and follow the path inside the folder(s) to the end file/folder that has a tiny padlock on the bottom left.
Then, 'get info' for that specific one and un-check the locked box.
Do this for each individual file/folder (yep, its a pain) and you will magically be able to empty the trash.
I think the terminal script way (published in several places, including the max site) didn't work because the route path wasn't specific to the individual lock.
Anyway - hope this helps peeps.
JMac
If you cannot un-check the 'locked' check box when 'get info' is invoked (or if you can but you STILL have un-deletable files), then open trash and follow the path inside the folder(s) to the end file/folder that has a tiny padlock on the bottom left.
Then, 'get info' for that specific one and un-check the locked box.
Do this for each individual file/folder (yep, its a pain) and you will magically be able to empty the trash.
I think the terminal script way (published in several places, including the max site) didn't work because the route path wasn't specific to the individual lock.
Anyway - hope this helps peeps.
JMac
This was exactly what I was looking for! Thanks!
The command I ended up using:
sudo chflags nouchg <filename>
The command I ended up using:
sudo chflags nouchg <filename>
Mac Identify Whaf App Has A File Locked Iphone
I am using software called FileBuddy. It also have function to search all Locked files and you can remove Locked status from all the files (or just from selected) with a click.
FileBuddy is excelent software and I can't imagine using Mac without it. Izotope rx studio one.
FileBuddy is excelent software and I can't imagine using Mac without it. Izotope rx studio one.
Files get locked that I never locked, so it has been frustrating. The easiest why I have found (at least with photos, not sure if it applies to all files) is to view it through Adobe Bridge. Select all and right click. If just one of the selected files is locked you'll get an option to 'unlock all', if no files are locked that option will not be available.
Hope this helps. If anyone knows how to prevent these files (usually happens with files being shared through a shared folder) from locking please advise.
thanks
Hope this helps. If anyone knows how to prevent these files (usually happens with files being shared through a shared folder) from locking please advise.
thanks
Just run the following command from within the root of the directory of files and sub-directorys whenever you have a lot of locked files. It will unlock every one recursively without writing a shell script. Mac OS X and up.
$sudo find . -print -exec Setfile -a l {} ;
$sudo find . -print -exec Setfile -a l {} ;
So if I use my SHELL to run your SCRIPT - then I don't understand what you mean with
…It will unlock every one recursively without writing a shell script… ;-)
…It will unlock every one recursively without writing a shell script… ;-)
The easiest way to do it is to open the folder that all of the locked folders are in. Select the folder. Single click the folder and type command I (as in the letter 'I'). At the bottom right of the info screen click the lock. Type in your administrator password which will unlock the permissions. Change the folder from 'Read only' to 'Read & Write'. Now for the cool part. At the very bottom just to the right of the zoom icon, click once and a drop down menu opens. Select 'apply to enclosed items' and every folder and program within that folder will be unlocked. You can do the same thing for batch locking programs.
There's a whole bunch of complicated stuff being suggested, but all you really need to do is hold 'command-shift' when emptying your trash.
I had a folder in my trash that wouldn't delete when I emptied. Mac OS would ask whether I wanted to delete the locked the file or not. Clicking on 'yes please' didn't actually delete it. https://sysentrancement929.weebly.com/cantos-de-inocencia-william-blake-pdf.html. Going into Inspector showed that it wasn't locked, and making sure all the permissions were 'read & write' didn't help any.
I still don't know why it insisting on saying it was locked, but the Shift-Command while emptying got rid of it for good.
I had a folder in my trash that wouldn't delete when I emptied. Mac OS would ask whether I wanted to delete the locked the file or not. Clicking on 'yes please' didn't actually delete it. https://sysentrancement929.weebly.com/cantos-de-inocencia-william-blake-pdf.html. Going into Inspector showed that it wasn't locked, and making sure all the permissions were 'read & write' didn't help any.
I still don't know why it insisting on saying it was locked, but the Shift-Command while emptying got rid of it for good.