On Thu, Jan 09, 2020 at 06:16:51AM +0000, Russell L. Harris wrote: > For development of a web pages, I installed Apache2 on another machine > in the LAN so that I can FTP web pages from the development machine to > the web server and view the pages from the development machine. > > But the installation of Apache2 on Buster serves documents from > /var/www/html/, which is owned by root, so as a normal user I cannot > FTP into that directory. > > The web server is not exposed outside the LAN, so security is not an > issue. > > What is the proper approach?
There is no single "proper" approach. There are many approaches that will work. However, there are some steps you have to take first. Step one: stop using FTP. Step two: SERIOUSLY. STOP USING FTP. Step three: I REALLY REALLY MEAN IT. IF YOU KEEP USING FTP, WE'RE DONE. Approach one: You could just install apache2 on the development machine. There's really no need to transfer the content to a second host, just to bounce it back to the original host via HTTP. Point the apache configs at wherever your in-development content resides. (For this approach and for all the other approaches, it doesn't *have* to be apache2. You could use nginx, or lighttpd, or any other web server.) Approach two: You could configure the web server on the second machine to serve your content via a virtual host that's rooted somewhere other than /var/www/html. Then rsync your content to that location, using whatever user account you've configured to have write access to that location. Approach three: You could give your user account ownership of, or group write access to, /var/www/html on the second machine and rsync your content there, if you are not using virtual hosts for some reason.