Why does OS X Lion ask for my password whenever I delete a file in my home directory?
I updated to Mac OS Lion and now every time I delete any file it asks me for my password. Any file - be it on the Desktop, in the Downloads folder or in any other place. It asks me for my password every time.
That behaviour is annoying. Is it the new default? Or there is something wrong?
Edit:
For example: this file, which is located on the desktop.
➜ Desktop l | grep terminal
-rw-r--r--@ 1 Nerian staff 841913 22 jul 14:16 terminal.png
Edit:
Seems that quite a lot of people are having the same issue:
https://discussions.apple.com/thread/3199093?start=0&tstart=0
https://discussions.apple.com/thread/3197928?start=0&tstart=0
Edit:
I can delete the same file – a screenshot in the desktop – using the terminal and I am not prompted for a password. If I use the GUI then I am prompted.
Also, If I create a new account and make a new screenshot and try to delete everything works just fine. No password required.
When I am prompted for my password and I write it, the file is then deleted yet it doesn't appear in the bin.
The problem was that the .Trash
folder in my user's directory was owned by root.
➜ ~ l | grep .Trash
drwx------ 82 root staff 2788 25 jul 17:26 .Trash
In order to give back the ownership to my user issue the following command:
➜ ~ sudo chown your_user_name ~/.Trash
Go to /Users
and choose your home folder. Hit Cmd+I
for the info pane for that folder and expand Sharing and Permissions.
Next to your username you should see Read & Write. Now, this permission DOES NOT apply always to the enclosed folders. You need to click on your username and then down on the wheel and arrow button and choose from the drop-down menu "Apply to enclosed folders".
This happens because when you copy folders and files between computers they maintain their original permissions and do not automatically update to reflect their new location.
I had a similar problem and found the solution here: https://discussions.apple.com/thread/3195797?start=0&tstart=0 – it was an issue with ACL's, not permissions.
[...] Finder asks for a password when I try to move any file in my $HOME to the Trash. Turns out that I had some weird ACLs set [...]:
$ ls -le .DS_Store -rw-------+ 1 bob staff 24580 Aug 7 01:04 .DS_Store 0: group:everyone deny delete
$ chmod -a "group:everyone deny delete" .DS_Store
After the chmod, deleting foo.txt succeeded. Running [the chmod command] with -R on $HOME will remove this ACL from all objects in $HOME.
[i.e.
chmod -R -a "group:everyone deny delete" Foo/
]