尝试在 TextWrangler 中保存 PHP 文件(或尝试启用 PHP)时出错
我试图在 TextWrangler 中保存 PHP 文件,但它一直给我错误:
You do not have sufficient privileges to perform this operation (MacOS Error code: -5000)
我还尝试通过打开文件来启用 PHP:
Macintosh HD:private:etc:apache2:httpd.conf
并编辑相应的文件,但我收到相同的错误消息。为什么我无法在计算机上进行这些更改?我以为它会提示我输入密码,但它只是给了我错误。谢谢。
I am trying to save a PHP file in TextWrangler and it keeps giving me the error:
You do not have sufficient privileges to perform this operation (MacOS Error code: -5000)
I've also tried to enable PHP by opening the file:
Macintosh HD:private:etc:apache2:httpd.conf
and editing the appropriate file but I get the same error message. Why would I be prevented from making these changes on my computer? I was assuming it would prompt me for a password but it just gave me the error. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道答案是什么了。
我从 Mac App Store 购买了 TextWrangler,但 App Store 的版本不允许经过身份验证的保存,以满足 App Store 提交准则(我不太清楚具体细节)。
应该下载的是:
http://www.barebones.com/products/textwrangler/
谢谢大家的帮助!
I found out what the answer is.
I purchased TextWrangler from the Mac App Store and the version from the App Store does not allow authenticated saves in order to meet the App Store submission guidelines (I don't know the specifics exactly).
The one that should be download is:
http://www.barebones.com/products/textwrangler/
Thanks for the help guys!
如果您确实想了解这一点,请阅读 unix 文件权限,并从终端在您正在编辑的目录中执行
ls -al
。本质上,您的用户只是没有权限,要么因为它不是所有者,要么因为写入被禁用。尝试在命令之前使用“sudo”。您的密码应该是您的用户密码。
您可以像这样更改权限:
sudo chmod 777 filename
(使全局可写)sudo chown myuser filename
(为文件创建新所有者)Read up on unix file permissions if you really want to understand this, and do an
ls -al
from terminal in the directory you're editing.Essentially, your user just doesn't have privileges, either because it isn't the owner or because writing is disabled. Try using 'sudo' before your commands. Your password should be your user password.
You can change permissions like this:
sudo chmod 777 filename
(makes globally writable)sudo chown myuser filename
(makes a new owner for file)