wordpress requires user and group www-data:www-data, and virtualmin requires domain:domain, several times a day I have to trade!

16 posts / 0 new
Last post
#1 Tue, 08/07/2018 - 07:57
herculesnetwork

wordpress requires user and group www-data:www-data, and virtualmin requires domain:domain, several times a day I have to trade!

Hi everyone.

wordpress requires user and group www-data:www-data, and virtualmin requires domain:domain, several times a day I have to trade!

How could I do, for virtualmin to use www-data:www-data, or wordpress to use my domainname:domainname?

that's with nginx that I use in a specific VPS I need nginx for high throughput, something that apache can not provide), apache wordpress normally works with domain: domain.

I really appreciate your help.

Tue, 08/07/2018 - 08:26
andreychek

Howdy,

It should be no problem at all to use domainname:domainname for the user/group with WordPress.

When using FCGID or CGI in Virtualmin, which is the default, all PHP code is executed as the Virtual Server owner (ie, "domainname").

In this case, the WordPress files would actually need to be owned by the Virtual Server owner, and not www-data.

The one thing I'd suggest though is to look in Server Configuration -> Website Options, and verify that the PHP Execution Mode is set to either FCGID or CGI. If it's set to mod_php, which we don't recommend, that would cause PHP to be run as "www-data".

If Virtualmin is indeed set to use FCGID or CGI, and you still are seeing problems -- what problems are you experiencing exactly when the WordPress files are set to use domainname:domainname?

-Eric

Tue, 08/07/2018 - 10:40 (Reply to #2)
herculesnetwork

hi andreychek, thanks for reply :-)

this is the proplem:    well the reaction I'm having, is that I can not do anything in wordpress without first having recursively www-data:www-date in public_html    and I can not install scripts or do some other things in virtualmin, without first doing it again recursively mydomain:mydomain       it is very uncomfortable the wordpress get asking ftp login to do any other. without saying that updating plugin is impossible without    change to www-data:www-data.       Sorry, I did not say I have two VPS, and that my vps with apache, everything is perfectly functional, even being domain:domain    I can do everything within virtualmin and wordpress without denying any permission. see the configuration of the website options in apache:
https://imgur.com/a/pxAxOdR

=====

my other vps is nginx, it has to be nginx, put my configis in images to get simpler to see:  

 see the configuration of my nginx vps phpinfo ():  https://imgur.com/a/NUdfms2

see the configuration of my nginx vps in maindomin.conf nginx server block: https://imgur.com/a/6RDdGS5

  see the configuration of my vps nginx in server configuration => website options: https://imgur.com/a/vVT27bO  

   But I think the nginx module you install to rerm the nginx server block does not use this website options feature.    I would like wordpress and virtualmin to use the same user in vps I use nginx as well as apache vps!

==== I admit that all the time I'm leaving in www-data: www-date and change to the default domain user, when I need to do something in virtualmin      that system prevents me, but I work much less in virtualmin than in wordpress, so preventing wordpress from working is being hard,      wordpress works all the time.

Tue, 08/07/2018 - 08:28
Kvark
Kvark's picture

i just install wordpress and dont have any issues, could you provide more detail?

Tue, 08/07/2018 - 11:02 (Reply to #4)
herculesnetwork

Thank you Kvark! I'm sorry I was so brief, it's just that the irritative problem of not being allowed to do anything inside the wordpress dashboard, but that's only in my vps with nginx.

  I need to use nginx in this vps, and nginx uses www-data user and group to manage nginx, and virtualmin does not change this as it does in apache vps.

then wordpress using www-data in the nginx install, and virtualmin does not modify the nginx user:group for the default virtual server user?, for apache virtualmin automatically applies the default user, and wordpress assumes the same user as apache. so in apache we can do anything inside virtualmin and inside the wp dashboard without receiving permission notices.

because for each virtualserver the virtualmin uses a different user in apache, and so wordpress assumes that apache user perfectly.

because virtualmin does not create a different user for nginx, so does wordpress take it too? just like in Apache?

How can I make nginx have its own user on every virtual server as in Apache?

Wed, 08/08/2018 - 02:53
herculesnetwork

Please?

Thu, 08/09/2018 - 05:46 (Reply to #6)
unborn
unborn's picture

Hi,

I would suggest you to follow nginx and wordpress docs for those setup topics and then once you are confident with settings you can change server templates to do exactly what you need to each setup on new domain/server automatically. I use apache as well - sorry (for more then 9 years) as I found it much easier and versatile to set my things up - nothing personal or against nginx.

Configuring/troubleshooting Debian servers is always great fun

Thu, 08/09/2018 - 06:15 (Reply to #7)
herculesnetwork

Thanks for your participation, you may not have anything against nginx, but what I realize in the internet forums, is that there is a "religion" called apache! and when anyone does not adhere apache, it seems they want to fire the person. I have every attention until using Apache. The truth is that between tests, nginx has incomparable performance to apache. Apache is heavy as an elephant, I have apache vps and I have only one nginx, the level of load you get with nginx is 5x larger with the same physical settings, the big portals in the world use nginx. because you get a lot more with less, Apache is heavy(I use apache for almost the 15 years), even if there are vanish and other things that we can use to make a diet in it, but it is still a weight that sucks resources of the machine. It's a shame that virtualmin does not support official nginx. People have become accustomed to the old apache and do not leave and it seems they do not forgive that leaves. People just want to say that one is way better than another! implant your thoughts in people! when they can help or simply not interfere when they can not help! Thanks for your participation.

Thu, 08/09/2018 - 06:49 (Reply to #8)
unborn
unborn's picture

Hi..

well I have only 10k visits a day on my sites which runs on old laptop from my home. Currently 7 sites hosted - that is roughly 70k unique visits a day, I did try nginx and apache and there was hardly the difference for me - resources and loads and bills means I did gone for apache as I found logic and configs easier for my self. I am not religion of apache or anything, I just found it easier work with the configs and scripting. Yes I agree that ''nginx has incomparable performance to apache'' and it really does, but however for my needs I do not need it.. I do not have 5000k visitors in day or hour per hosted site, which would nginx make difference.. sorry I was just saying my opinion that's all. If I ever get those numbers then I would consider to switching to nginx, until then - Im happy.

I found your reply bit offensive towards me and my knowledge and others who use apache and nginx - I am sorry that I've was not able to help you - but I would still refer you to read docs about nginx and configs online and I get your msg about not participate in this forums - I gave you my honest opinion - which I am so sorry about. In other words - Good luck and please do not offend others like this, its not nice.

Configuring/troubleshooting Debian servers is always great fun

Thu, 08/09/2018 - 06:58 (Reply to #9)
herculesnetwork

Hi...

I said, "you may not have anything against nginx, but what I do in the internet forums," .... You've been included in some way, do not offend when I've just said of what I always find in forums. Thank you in the same way for your participation and sharing of experience.

Wed, 08/08/2018 - 03:56
Kvark
Kvark's picture

dont try yet with nginx - hardly can help :(

Thu, 08/09/2018 - 05:56
thathwamasi

Hello herculesnetwork,

As a temporary soluction when running as domain:domain. create a FTP user in virtualmin, then on wp-config.php add below, define('FTP_USER', 'example'); define('FTP_PASS', '*******'); define('FTP_HOST', 'example.com:21'); define('FTP_SSL', false);

Please try this as temporary solution.

Thu, 08/09/2018 - 06:35 (Reply to #12)
herculesnetwork

Hi thathwamasi. I am very grateful for your participation :-)

   I thought of something just to speed up the hard process,

I will create 2 files, 1 of them with the command to apply chown www-data in each public_html dir of each virtual server and file 2 with a command to chown orginal of each virtual server, so I will not waste much time to change the owner of each directory using the spoken virtualmin manager! I just type a word in the terminal and they're all done the way I need them right now, doing that idea, I can leave all the time in the original virtualmin chown (and not all the time on www-data! how I was doing). only in the few minutes I update the plugins. themes, etc.

I type each chown for each dir on a different line within these files

nano /usr/local/bin/ownerwww

nano /usr/local/bin/ownercorrect

just typing owner ... I'll fix things

in the future I will try to know wordpress not working with www-data.

your idea is already annotated, I'll do it on one of the servers :-)

Sat, 08/18/2018 - 06:06
adamjedgar

None of my wordpress sites on virtualmin are owned by www.data user or group. My understanding of wordpress codex on ownership isv"Your wordpress user" not www.data. for me that is the account user and group setup by virtualmin when you create a virtualmin virtual server.

All mine are virtualmin (virtual server name) : (virtual server name)

and work perfectly with wordpress file uploads and updates.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Sat, 08/18/2018 - 11:42
herculesnetwork

the settings of my virtualmin are intact, and when I create any virtualmin, always comes the owner domain: domain, and wordpress when I install, I am obliged to use www-data: www-data to update plugins, themes, use images, what you're saying that wordpress works with domain: domain, it's using apache, I do not use apache in that specific VPS, I use nginx, I need high performance that only nginx can provide.

Sat, 08/18/2018 - 20:00
adamjedgar

"high performance that only nginx can provide"?

in all honesty, if you are having trouble making wordpress work correctly, than i wonder if you really have an application that requires such high performance that "only nginx can provide", when it may actually be a lack of sufficient resources allocated to the server itself that need addressing.

I have concerns about your statement that apache is slower than nginx. From my reading, when serving static content this may be that case, however, there is an argument that when serving dynamic content, the opposite is true. essentially this means that when running php applications like wordpress cms, nginx has to pass off dynamic content processing to external handlers for execution, then wait for the content to be sent back again, only then can it relay said content to the client. Apache, accordign to the bloggs i have read about it, does all this natively "in house". The interesting thing is, that whilst niginx has natively a lighter overhead for serving static content, Apache can also function in the same manner.

nginx also has other disadvantages when it comes to .htaccess files but then again it also has some advantages when not allowing directory overrides that apache .htaccess files provide for.

At the end of the day, which one you choose is up to you and your application.

I am no expert on these things, however, as far as i can tell, for a wordpress cms (which serves considerable dynamic content) one might actually be better off running apache over nginx!

If your website is running slowly, instead of blaming apache, perhaps you need to more closely look at your hosting provider (or vps provider). Clearly that is where your performance issues are and nginx is unlikely to really solve your issues with a wordpress cms running php dynamic content (forget caching as a wordpress solution btw, that is largely a false positive too).

finally, and i am not an nginx user, you can apparently change the nginx user in nginx.conf to anything you like.

here are some links to setting up nginx to run wordpress...i havent read through them in depth, so i hope they are of use to you.

https://codex.wordpress.org/Nginx
https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/
https://www.digitalocean.com/community/questions/owner-of-nginx-process

personally, in looking at the seemingly large amount of stuffing around one has to do in order to run wordpress with nginx, i wouldnt bother! (just me)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked