Jump to content
Froxlor Forum
  • 0

Error /Froxlor with nginx and fpm


Gamerboy59

Question

Hello,

I set up froxlor using nginx and fpm. So far so good and everything is smooth but when I create a customer, the following error appears:

root@de3:~# php /var/www/html/scripts/froxlor_master_cronjob.php --force --debug
[information] TasksCron: Searching for tasks to do
[information] TasksCron: Task2 started - create new home
[notice] Running: mkdir -p '/var/customers/webs/<user>/webalizer'
[notice] Running: mkdir -p '/var/customers/mail/<user>/'
[notice] Running: cp -a /var/www/html//templates/misc/standardcustomer/* '/var/customers/webs/<user>/'
[notice] Running: chown -R 10002:10002 '/var/customers/webs/<user>/'
[notice] Running: chown -R 2000:2000 '/var/customers/mail/<user>/'
[notice] Creating passwd file
[notice] Writing 1 entries to passwd file
[notice] Succesfully wrote passwd file
[notice] Creating group file
[notice] Writing 1 entries to group file
[notice] Succesfully wrote group file
[notice] Creating shadow file
[notice] Writing 1 entries to shadow file
[notice] Succesfully wrote shadow file
[information] Creating new FTP-home
[information] Running Let's Encrypt cronjob prior to regenerating webserver config files
[information] Requesting/renewing Let's Encrypt certificates
[information] No new certificates or certificates due for renewal found
[information] nginx::createIpPort: creating ip/port settings for  123.456.789.012:80
[information] nginx::createIpPort: creating ip/port settings for  123.456.789.012:443
PHP Warning:  touch(): Unable to create file /var/customers/logs/<user>-error.log because No such file or directory in /var/www/html/lib/Froxlor/Cron/Http/Nginx.php on line 1048
PHP Warning:  chown(): No such file or directory in /var/www/html/lib/Froxlor/Cron/Http/Nginx.php on line 1049
PHP Warning:  chgrp(): No such file or directory in /var/www/html/lib/Froxlor/Cron/Http/Nginx.php on line 1050
PHP Warning:  touch(): Unable to create file /var/customers/logs/<user>-access.log because No such file or directory in /var/www/html/lib/Froxlor/Cron/Http/Nginx.php on line 1058
PHP Warning:  chown(): No such file or directory in /var/www/html/lib/Froxlor/Cron/Http/Nginx.php on line 1059
PHP Warning:  chgrp(): No such file or directory in /var/www/html/lib/Froxlor/Cron/Http/Nginx.php on line 1060
[information] nginx::writeConfigs: rebuilding /etc/nginx/sites-enabled/
[information] Froxlor\Cron\Http\NginxFcgi::reload: running service php7.3-fpm restart
Job for php7.3-fpm.service failed because the control process exited with error code.
See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.
[information] Froxlor\Cron\Http\NginxFcgi::reload: reloading Froxlor\Cron\Http\NginxFcgi
[information] Task4 started - Rebuilding froxlor_bind.conf
[information] Cleaning dns zone files from /etc/bind/domains/
[information] No domains found for nameserver-config, skipping...
[notice] Creating passwd file
[notice] Writing 1 entries to passwd file
[notice] Succesfully wrote passwd file
[notice] Creating group file
[notice] Writing 1 entries to group file
[notice] Succesfully wrote group file
[notice] Creating shadow file
[notice] Writing 1 entries to shadow file
[notice] Succesfully wrote shadow file
[notice] Checking system's last guid

 

Additionally, but not very important though, is that at the end of the URL there is always a 2nd "/". Guess that is nginx redirect config..

 

However, always when I create a new customer the error appears and the system crashs.

Thanks for your kind help.

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 1
32 minutes ago, Gamerboy59 said:

I'm on Debian 10 but that shouldn't cause any trouble here. Nscd is no more required to have extrausers working, is it?

nscd can be left out, it's not needed. I'm too on debian 10 and can confirm that this is working properly.

32 minutes ago, Gamerboy59 said:

btw: is the request to approve configuration just a hint or is there any further setting related to it?

you mean the alert in the top right corner telling you that you have not yet configured the services? If you did so, you can safely acknowledge. it would be automatically acknowledged if you used the cli configuration though (because there we know that everything was being executed)

Link to comment
Share on other sites

  • 1

Configuration templates use settings values...for example the path to the zone configs which seems to be set to /etc/powerdns/ on your settings. You need to adjust your settings according to the services you want to use prior to running the configuration of the service

Link to comment
Share on other sites

  • 0

Ok, just noticed froxlor created two different folders /var/customer and /var/customer

The latter one did have the logs directory.

Additionally, it appears that no users are passed through extrausers. I can find an user entry in /var/lib/extrausers/passwd but that's not found with "id <user>".

Link to comment
Share on other sites

  • 0
8 hours ago, Gamerboy59 said:

Ok, just noticed froxlor created two different folders /var/customer and /var/customer

it's all settings. per default it's /var/customers/ for webs, mail, logs and tmp

8 hours ago, Gamerboy59 said:

Additionally, it appears that no users are passed through extrausers. I can find an user entry in /var/lib/extrausers/passwd but that's not found with "id <user>".

did you go through the configuration steps for libnss-extrausers? 

Link to comment
Share on other sites

  • 0
52 minutes ago, d00p said:

it's all settings. per default it's /var/customers/ for webs, mail, logs and tmp

did you go through the configuration steps for libnss-extrausers? 

Yh, fixed the directory in the settings and created a symlink for just in case.

I went thru all installations steps (which aren't that many). I guess the extrausers setup is working as the users are shown in the files. The nsswitch file was completely copy&pasted so should be working too. I'm on Debian 10 but that shouldn't cause any trouble here. Nscd is no more required to have extrausers working, is it?

 

I guess I'll do a reinstall anyways. Maybe it'll be fixed then.

 

btw: is the request to approve configuration just a hint or is there any further setting related to it?

Link to comment
Share on other sites

  • 0

Ok, I reinstalled my server but same issue.

 

Here's my nsswitch.conf

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat extrausers
group:          compat extrausers
shadow:         compat extrausers
gshadow:        files

hosts:          files dns
networks:       files dns

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netmasks:       files
netgroup:       files
bootparams:     files

automount:      files
aliases:        files

/var/lib/extrausers/passwd and These files contain the correct user Information, just the system can't find them. Did I miss something?

Link to comment
Share on other sites

  • 0
36 minutes ago, d00p said:

hm, no, looks the same on my system and works just fine, sorry, no idea

Or is maybe something wrong with the generation of the passwd file? The path in 'space' appears to be set twice:

maxm@:x:10000:10000:Max Mustermann:/var/customers/webs/maxm/var/customers/webs/maxm/:/bin/false

 

Edit: If I search the usernumber ("id 10000") I can find the corresponding user but when I search the username ("id maxm") it says no user found.

Link to comment
Share on other sites

  • 0

why is there an @ sign in the username? Can you please give more detailed information about your settings (ftp-user login or weird usernames?) The double path might also be an issue because i do not have that anywhere for any user....also please state which froxlor version etc.

Link to comment
Share on other sites

  • 0
21 minutes ago, d00p said:

why is there an @ sign in the username? Can you please give more detailed information about your settings (ftp-user login or weird usernames?) The double path might also be an issue because i do not have that anywhere for any user....also please state which froxlor version etc.

I don't know. Removing the @ and the double path make it working again. I recently updated to the latest git version but a downgrade didn't help either.

Link to comment
Share on other sites

  • 0
1 minute ago, Gamerboy59 said:

Did you test with latest git?

..of course? It's being tested using travis-ci after every push to the repository.

Sorry, i don't know your settings or setup so I cannot tell you out of the blue what might be wrong

Link to comment
Share on other sites

  • 0

Okay, possibly found it, i guess you are talking about the scenario when a new customer is being added which automatically adds a default ftp user for it.

try the following diff to see if the homedir path is correct once a new customer has been added:

diff --git a/lib/Froxlor/Api/Commands/Customers.php b/lib/Froxlor/Api/Commands/Customers.php
index f888ad0f..11e0b014 100644
--- a/lib/Froxlor/Api/Commands/Customers.php
+++ b/lib/Froxlor/Api/Commands/Customers.php
@@ -565,7 +565,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
                                        }
                                        $this->apiCall('Ftps.add', array(
                                                'customerid' => $customerid,
-                                               'path' => $documentroot,
+                                               'path' => '/',
                                                'ftp_password' => $password,
                                                'ftp_description' => "Default",
                                                'sendinfomail' => 0,

 

Link to comment
Share on other sites

  • 0

Indeen, this did the trick. I also noticed that I get rid of the <user>@ when I disable the option to allow ftp-login with domain (Settings -> Account Settings -> FTP accounts @domain disabled).

 

Thanks for your help. Now it's working great again. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...