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.

有帮助吗?

解决方案

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!

其他提示

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)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top