开发者

Can't save any files in Xcode due to permission error

I suddenly can't save any files in any of my Xcode projec开发者_JAVA技巧ts in my home directory. Not sure what caused this. Here's the error I'm receiving:

Can't save any files in Xcode due to permission error

I don't think Xcode is correct, since I am the owner of -- and have read+write permissions on -- the affected files.

A few other fun facts:

  • I can edit these files in other applications as the same user, so the problem seems to be specific to Xcode.
  • Other users can create and edit projects in their home directory without issue.
  • Running Xcode as root (via sudo /Developer/Applications/Xcode.app/Contents/MacOS/Xcode) does allow me to edit these files.
  • chown, chmod -R 755, etc. on the directory containing my projects doesn't help.
  • Disk Utility > Repair Permissions doesn't help.
  • Reinstalling Xcode, clearing Xcode .plists, etc. doesn't help. Failing both on Xcode 4.1 and 4.2.

Thoughts? Hopefully I'm just missing something simple.


I've just run into this issue myself. No amount of rebooting fixed it for me. In fact, it only began after a reboot. After much frustration, I used fs_usage to observer the file system calls that Xcode and any other processes were making when I attempted to save.

The results were interesting. In particular, one of the last things I saw before Xcode loaded NSAlertPanel.nib (which I assume is the UI for the error sheet), thing showed up:

revisiond.3029 getattrlist /private/var/folders/9f/_7xjwv310nb6c7yr6py_9jtc0000gn/T/TemporaryItems

Xcode.2437 mkdir /private/var/folders/9f/_7xjwv310nb6c7yr6py_9jtc0000gn/T/TemporaryItems/(A Document Being Saved By Xcode)

This looked highly suspect to me, so I investigated this directory. It turns out that

"/private/var/folders/9f/_7xjwv310nb6c7yr6py_9jtc0000gn/T/TemporaryItems" was owned by root:staff, and NOT writable by the group. Making this directory writable by the group fixed the issue for me immediately.

So, it appears this was a bad iteration between Xcode and revisiond, which is responsible for the File Coordination features in Lion. I do not know why this problem persisted for me when a reboot fixed it for others.


Check how you have this setup in source control. I've noticed with the new Xcode that if you have this under source control (svn) that that might be blocking your ability to write over the file regardless of permissions.

You may want to do an svn cleanup


from terminal issue a

ls -laE@"

There may be extended attributes or ACL (Access Control List) permissions problems. I have had that happen. It can be really bad if it has inherited attributes

If that is the case fix with

chmod -R -N

Be careful!


Looks like I had netbiosd blocked in my firewall configuration. After unblocking it and restarting my computer, the issue seems to be resolved.


I spent about two hours with this same problem. I tried all of the above. Finally, I rebooted my machine. Everything works fine after the reboot.


Everything was working fine and i ran into this issue. I tried most of the above suggestion. Finally,the MacOSX software update resolved the issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜