I have a Wordpress website on my Ubuntu Server, and in order to change the theme, I need to set the file permissions. As I have read, it is unwise to permanently set the permissions to write for everyone, so I will have to enable them for the time I have to edit, and then revert them.
The problem is, I don't want to have to manually write down every permission on every file, and I am looking for a way to just revert them to earlier state.
Right now if I do this
ls -l /path/to/file.this
I get this
-rwxr-xr-x 1 root root 26403 May 19 ......
So here's what I need:
1) If possible (AND SAFE), can I grant all the needed permissions to all files inside the /html
folder to the Lamp Server, so I won't have to change them every time I need to edit the design of my website?
2) If not possible, how do I set the permissions I need in order to edit the file in Wordpress, and then change them back?
EDIT: Ok, I have done this
chown www-data:www-data -R /var/www/html
Now I can edit the files from my Wordpress dashboard. Is this ok for security? Will the files be accessible only by me?