Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm running Mountain Lion and I have a folder in ~/sites that has a red icon on the folder folder icon and I can't open it because 'access is denied'.

What I've tried:

  1. Get Info > unlock with admin password, change 'everyone' privilege to 'read write' but won't change so tried 'read only' but still 'access denied'

  2. Terminal > sudo chmod -R 0777 ~/sites/lockedfolder

  3. Terminal > sudo chmod -R 0777 ~/sites

  4. Terminal > sudo chmod a+rwx ~/sites/lockedfolder

  5. Terminal > sudo chmod a+rwx ~/sites

  6. Disk utility > repair permissions and steps 1-5 again but no luck

All users now show 'read write' access in get info window but still folder icon and no access...

Info

What can I try next?

share|improve this question
    
can you access it from the command line when you are root. ie after running sudo -s? If so can you then delete the folder and recreate it? –  Deesbek Oct 15 '13 at 22:43
1  
@Deesbek I can see the folder contents in terminal using ls without sudo command only finder is blocking it... I wanted to avoid deleting and recreating it if possible but I'll try that now. –  doovers Oct 15 '13 at 22:52
    
have you killed finder and restarted it? 'Killall Finder' Seems like it is a finder issue. How was the folder created? –  Deesbek Oct 15 '13 at 22:55
    
@Deesbek I think you could be right about it being a finder issue. I deleted and recreated the folder successfully but had some issues reinstating the permissions for _www but after randomly unlocking and relocking the get info window everything just popped up as expected... So it probably would have been solved easily with killall finder. If you want to write that suggestion an answer I can mark it solved. –  doovers Oct 16 '13 at 1:56

3 Answers 3

up vote 2 down vote accepted

This is probably due to an issue with Finder. Relaunch finder with the following command in terminal:

killall -HUP Finder
share|improve this answer

In addition to the Unix file permissions, there are old HFS file bits. To unlock your folder try:

Terminal > SetFile -a l ~/sites/lockedfolder

OR

Terminal > chflags nouchg ~/sites/lockedfolder

Alternatively, you could do a Get Info in the Finder, and uncheck the "Locked" checkbox from that window.

enter image description here

share|improve this answer
    
You can also do this with `chflags nouchg'. –  da4 Oct 16 '13 at 15:58
    
Thanks, I added that to my answer. –  Mark Oct 16 '13 at 16:02
    
Thanks Mark, good to know for future reference! Sorry I can't upvote but my rep is too low for now :) –  doovers Oct 17 '13 at 0:07

Download BatChmod, free and very, very handy.

When one is done working, correct permissions are easily restored.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.