I have created and set the permissions to some files and folders under /var/www/mywebsite.
For files 644 and for folders 755.
I am the owner of those files and folders, since I created them under that directory.
However, I am not able to write and save the files under /var/www/mywebsite
If I change permissions to 777 I can edit them normally but if I upload them to my server, files keep their permissions as 777 and I have to change them back to 755 and 644. This adds an extra step for total development process, and I was wondering if there is a better practice when working with a php projects and ubuntu. Should I move the web folder of apache to another directory, for example home and work from there?
Here is the output of ls -l /var/www
themhz@hal9000:~$ ls -l /var/www
total 10
drwxr-sr-x 18 themhz root 4096 Μάι 3 05:58 mywebsite
drwsr-sr-x 18 themhz root 4096 Οκτ 28 2013 agorasite.gr
drwsr-xr-x 17 themhz themhz 4096 Οκτ 28 2013 agorasite
drwsr-xr-x 17 themhz root 4096 Δεκ 9 2012 aimodosia
lrwxrwxrwx 1 root root 22 Φεβ 14 09:25 apc.php -> /usr/share/php/apc.php
drwsr-xr-x 3 themhz root 4096 Αύγ 30 2011 apolo
-rw-r--r-- 1 themhz root 297307 Φεβ 20 2013 background5.jpg
drwxr-sr-x 3 themhz root 4096 Αύγ 17 2013 backups
drwsr-xr-x 10 themhz root 4096 Ιούλ 2 2012 booking
Any advises or suggestions for best practices when developing php applications and setting up a dev working system?
My system is running Ubuntu 12.04
thank you
ls -l /var/www
?