Cannot create a file with sudo in Apache web directory Suddenly the following problem has happened:
I have an Apache web directory at /www. Everything was ok with the permissions, but at some point (I can't realize what caused it), I become unable to create any new files in this directory.

I have tried two methods:


Saving a new file from Sublime
running sudo echo "" &gt; newfile.


But both methods failed. On the other hand I am able to create new files in my home directory (using both mentioned ways) and then to copy or move them to /www. What may be the issue and how to solve it?
sudo echo "" &gt; newfile should never have worked, because sudo only applies to the echo command and not to the redirection. Try using sudo touch newfile or echo "" | sudo tee newfile.

Sublime Text doesn't seem to support creating new files to a directory you don't have write permission to. It does support authenticating as root when modifying an existing file though. See http://sublimetext.userecho.com/topic/27820-prompt-if-need-elevated-permission-to-save/.

Maybe you did have write permission to the directory earlier but something (like upgrading to 10.9) removed it.