由于权限错误,无法在 Xcode 中保存任何文件
我突然无法在主目录中的任何 Xcode 项目中保存任何文件。不知道是什么原因造成的。这是我收到的错误:
我认为 Xcode 不正确,因为我是所有者受影响的文件,并且具有读+写权限。
其他一些有趣的事实:
- 我可以以同一用户的身份在其他应用程序中编辑这些文件,因此问题似乎是 Xcode 特有的。
- 其他用户可以毫无问题地在其主目录中创建和编辑项目。
- 以 root 身份运行 Xcode(通过 sudo /Developer/Applications/Xcode.app/Contents/MacOS/Xcode)确实允许我编辑这些文件。
- 在包含我的项目的目录上执行
chown
、chmod -R 755
等没有帮助。 - 磁盘工具>修复权限没有帮助。
- 重新安装 Xcode、清除 Xcode .plists 等都没有帮助。在 Xcode 4.1 和 4.2 上均失败。
想法?希望我只是错过了一些简单的事情。
I suddenly can't save any files in any of my Xcode projects in my home directory. Not sure what caused this. Here's the error I'm receiving:
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我自己刚刚遇到这个问题。无论重新启动多少次都无法解决我的问题。事实上,它只是在重新启动后才开始。经过多次挫折后,我使用
fs_usage
来观察当我尝试保存时 Xcode 和任何其他进程正在进行的文件系统调用。结果很有趣。特别是,我在 Xcode 加载 NSAlertPanel.nib 之前看到的最后一件事(我认为是错误表的
UI
)出现了:这对我来说非常可疑,所以我调查了这个目录。事实证明
因此,这似乎是 Xcode 和 revision 之间的一次糟糕的迭代,它负责 Lion 中的文件协调功能。我不知道为什么这个问题对我来说仍然存在,而重新启动却为其他人解决了这个问题。
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:This looked highly suspect to me, so I investigated this directory. It turns out that
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.
检查您如何在源代码管理中进行此设置。我注意到,在新的 Xcode 中,如果您将其置于源代码控制 (svn) 之下,则无论权限如何,都可能会阻止您覆盖文件的能力。
你可能想要进行 svn 清理
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
来自终端问题 a
可能存在扩展属性或 ACL(访问控制列表)权限问题。我就遇到过这种情况。如果它具有继承属性,那可能会非常糟糕
如果是这种情况,请修复“
小心!”
from terminal issue a
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
Be careful!
看起来我的防火墙配置中阻止了 netbiosd。解锁并重新启动计算机后,问题似乎已解决。
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.
一切工作正常,我遇到了这个问题。我尝试了上面的大部分建议。最后,MacOSX 软件更新解决了该问题。
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.