I installed Apache2 and PHP5 last night on my fresh Linux Mint machine.
I created a folder and created a simple index.php
file with a call to phpinfo()
to test out the installation and every works correctly.
However when I open the file with Sublime Text 2 or any other editor, I cannot save my changes. I can use the sudo nano
command to open it with super user privileges and I can save just fine.
The same goes with Mercurial. I cannot hg commit
because of permissions. I can only sudo hg commit
.
Is this how the basic workflow is supposed to be? If I run the chmod
command and recursively give 777
permissions to the folders and files within Apache can run it just fine, but if it's a dynamically created file (created by my web app) then it seems Apache cannot access or run it. I have to run the chmod
command again!
Any suggestions on what I should do? I feel like 30% of my time is spent on redundant processes that shouldn't be done at all.