I have written a script that installs a LAMP environment and a few other helpful programs. All of this has been installed under root.
I would now like to create a new user called webmaster that will only be responsible for rendering my website located under: /home/webmaster/htdocs. As such I have created a new user called "webmaster".
When I run a "ls" on the htdocs folder I get the following output:
-rw-rw-r-- 1 webmaster www-data 1843 Aug 26 21:12 composer.json
drwxrwsr-x 3 webmaster www-data 4096 Aug 26 21:12 src
Should the group really be owned by www-data or should I change the group to www-data and then simply add the Apache user, www-data, to the "webmaster" group? What is the best method with regards to security?