<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p><br /></p>
<div> </div>
<p>How would I know what user WordPress runs as? And how would I know what groups that user is in?</p>
<p><br /></p>
<p>On 2019-06-20 20:34, James Mcphee wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">does the wordpress service run as a user with membership in the www-data group? It should, but you never know.</div>
</blockquote>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><br />
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Jun 20, 2019 at 8:18 PM <<a href="mailto:techlists@phpcoderusa.com">techlists@phpcoderusa.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
<div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif;">
<p>Thanks!!</p>
<p>Ownership is <span>{my-user-name}:www-data</span></p>
<p>Permissions is 775</p>
<p>I added <span>{my-user-name} to the www-data group : </span>usermod -a -G www-data <span>{my-user-name}</span></p>
<p>/etc/group has an entry www-data:x:33:<span>{my-user-name} which I assume verifies {my-user-name} was added to the www-data group?</span></p>
<p>I can SFTP and I can remote edit using my editor, however WordPress asks for FTP credentials when I try to remove a plugin.</p>
<p>Any thoughts?</p>
<p>Thanks!!</p>
<p><br /></p>
<div> </div>
<p><br /></p>
<p>On 2019-06-20 19:47, James Mcphee wrote:</p>
<blockquote style="padding: 0px 0.4em; border-left: 2px solid #1010ff; margin: 0px;">
<div dir="ltr">Also, you're going to want to add your user to the www-data group. Then check to see what perms a modified or added file has. If it's not something you can write to, you'll have to set some suids or default facls.</div>
<br />
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Jun 20, 2019 at 7:42 PM James Mcphee <<a href="mailto:jmcphe@gmail.com">jmcphe@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
<div dir="ltr">You need to give www-data write access for wordpress to be able to write to files. chmod -R 775 www/
<div>Whether a web daemon SHOULD have access to edit its own files is a whole nother question.</div>
</div>
<br />
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Jun 20, 2019 at 7:35 PM <<a href="mailto:techlists@phpcoderusa.com">techlists@phpcoderusa.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
<div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif;">
<p><br /></p>
<p>Hi I am running a local server running Ubunto 16.04LTS with a stock LAMP install that runs stock Apache.</p>
<p>I have an install of WordPress under /var/www/vhost/{vhost-name}/public_html</p>
<p>Here is my problem.</p>
<p>I can either FTP or WordPress can edit / remove file. I cannot do both. Not sure why.</p>
<p>To allow WordPress to modify files I must: (I cannot SFTP)</p>
<ul>
<li>chown -R {my-user-name}:www-data www/</li>
<li>chmod -R 755 www/</li>
</ul>
<p><span>To allow me to SFTP I must change the file ownership: (WordPress cannot modify files)</span></p>
<ul>
<li><span>chown -R {my-user-name}:www-data www/</span></li>
</ul>
<p><span>I would like to be able to FTP and allow WordPress to modify files.</span></p>
<p><span>Any help much appreciated.</span></p>
<p><span>Thanks!!</span></p>
<p><br /></p>
</div>
---------------------------------------------------<br /> PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">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" target="_blank" rel="noopener noreferrer">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote>
</div>
<br clear="all" />
<div> </div>
-- <br />
<div class="gmail-m_5477397937814930701gmail-m_6323349359425464166gmail_signature" dir="ltr">James McPhee<br /><a href="mailto:jmcphe@gmail.com">jmcphe@gmail.com</a></div>
</blockquote>
</div>
<br clear="all" />
<div> </div>
-- <br />
<div class="gmail-m_5477397937814930701gmail_signature" dir="ltr">James McPhee<br /><a href="mailto:jmcphe@gmail.com">jmcphe@gmail.com</a></div>
<br />
<div class="gmail-m_5477397937814930701pre" style="margin: 0px; padding: 0px; font-family: monospace;">---------------------------------------------------<br /> PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">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" target="_blank" rel="noopener noreferrer">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></div>
</blockquote>
</div>
---------------------------------------------------<br /> PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">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" target="_blank" rel="noopener noreferrer">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote>
</div>
<br clear="all" />
<div> </div>
-- <br />
<div class="gmail_signature" dir="ltr">James McPhee<br /><a href="mailto:jmcphe@gmail.com">jmcphe@gmail.com</a></div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">---------------------------------------------------<br /> PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">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" target="_blank" rel="noopener noreferrer">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></div>
</blockquote>
</body></html>