<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">So with the apache virtual hosts, all the files would belong to Apache. so any files you want to allow PHP to modify you would need to make sure that www-data has the ability to modify the files. Also, make sure they don't have any root ownership.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">my preferred configuration is to make anything run by my web server is owned by the web server, and then any files that are deemed "dangerous" are read-only until I need them to change.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 26, 2019 at 6:27 PM <<a href="mailto:techlists@phpcoderusa.com">techlists@phpcoderusa.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi,</p>
<p>I am running Ubuntu 16.04 on a test server. I'd like to understand ownership for virtual hosts. I assume www-data:www-data so the files can be edited by PHP such as WordPress being able to upload or upgrade themes and plugins. Is this correct?</p>
<p>I would also like to do some remote editing using SFTP. Some say to add a password and shell to www-data so the editor can connect as www-data. This seems like a security issue.</p>
<p>The other solution i;m seeing is to make the owner:group <span>$USER:$USER - which makes the files owned by the SFTP user which seems not secure and I'm figuring WordPress will not be able to edit it's own files.</span></p>
<p>What is the appropriate way?</p>
<p>Thanks in advance.</p>
<p>Keith </p>
<p><br></p>
<p> </p>
</div>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br><br>Stephen<br><br></div>