Recently I noticed that new directories I create are always owned by root. Is this how supposed to be? I created this directory to put html files for a web server
/var/www/site1/html/index.html and it is owned by root. I did
sudo chown -R a:a /path-to-directory to change the owner to me; and I did
sudo chmod 777 -R /path-to-directory to change permissions for all. Now I have:
-rwxrwxrwx 1 a a 2 Dec 17 19:18 index.html
How can I create directories so that I own the directories I created with read and write permissions? And is it good to change a file read/write/execute for all?