• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

WARNING during statistics_collector execution

Scampicfx

New Pleskian
Dear folks,

I just migrated from one server to another server using Plesk 11.5.30 on both machines.

After migrating one domain, I noticed that the statistics (disk usage) were not up to date... So i started googling and found the command:

/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=domain.tld

It is also noted in here:
http://kb.parallels.com/en/393

However, when I try to run this command I get the following error:

WARNING during statistics_collector execution: : './domain.tld/logs' already exists, but has wrong access rights. Specify --force to override.
statistics_collector: /opt/psa/admin/sbin/relink-vhost-logs execution failed:
ERROR: Cannot relink logs. Target directory '/var/www/vhosts/domain.tld/logs' is in invalid state.

So, I tried to reset the owner, reset the access right, deleted the folder and created it again, uploaded the files directly from the backup, but nothing helped. The statistic is - for the time being - now updated, but I want to get rid of this error message. I'm just a bit scared that maybe some future updates won't work. So, I continued using google:

I tried that one: http://kb.parallels.com/en/117725 and I updated my passwd, but it didn't help either...
Meanwhile, I also came across this, but it didn't help, too: http://kb.parallels.com/en/116191

So, right now, I just don't know what to do in order to get domain.tld/logs in a valid state...

Any help is highly appreciated!

Thank you so much!

(And, of course, I replaced domain.tld with my domain name ;))
 
What sort of output of following commands:

# stat /var/www/vhosts/domain.tld/logs

# grep domain.tld /etc/passwd

Looks like problem in incorrect record for this domain in /etc/passwd
 
Dear IgorG,

thanks for the quick reply:

Using: # stat /var/www/vhosts/domain.tld/logs
following output: -bash: /var/www/vhosts/10thgunfighters.de/logs: Is a directory

Using: # grep domain.tld /etc/passwd
following output:

semiadmin:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs:/bin/false
add_user_a:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
add_user_b:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
add_user_c:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
add_user_d:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
add_user_e:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
add_user_f:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
add_user_g:x:10001:1005::/var/www/vhosts/domain.tld/httpdocs/ftpshare:/bin/false
mainaccount:x:10001:1005::/var/www/vhosts/domain.tld:/bin/false

EDIT: The User Accounts add_user_x are just accounts for FTP Access. They do not have access to Plesk. The "mainaccount" is the main admin of domain.tld. The "semiadmin" is an additional admin with access to plesk, but with restricted permissions ;)

EDIT2: Using # ls -l for /var/www/vhosts/domain.tld regarding the folder logs:

drwx------ 2 semiadmin root 4096 May 27 22:50 logs

That's interesting. I tried using # chown -R -v mainaccount logs to change the owner of the folder logs to the mainaccount... However, after running the command I get following output:


ownership of `logs/access_log.processed.1.gz' retained as semiadmin
ownership of `logs/xferlog_regular' retained as semiadmin
ownership of `logs/xferlog_regular.webstat' retained as semiadmin
ownership of `logs/access_log.webstat' retained as semiadmin
ownership of `logs/access_ssl_log' retained as semiadmin
ownership of `logs/access_log.processed' retained as semiadmin
ownership of `logs/xferlog_regular.processed' retained as semiadmin
ownership of `logs/access_ssl_log.webstat' retained as semiadmin
ownership of `logs/access_log' retained as semiadmin
ownership of `logs/error_log' retained as semiadmin
ownership of `logs/access_ssl_log.processed' retained as semiadmin
ownership of `logs' retained as semiadmin

and using # ls -l gives the same output as above... hmm


Thanks for your help!
 
Last edited:
Dear folks,

I'm still sitting on the error, so any help is highly appreciated.

Meanwhile, I tried to change the owner of the folder domain.tld (path: /var/www/vhosts/domain.tld)... I added chmod +x domain.tld, however, it's still not possible to run the statistic script. When running, I receive following error message:

Code:
WARNING during statistics_collector execution: : './domain.tld/logs' already exists, but has wrong access rights. Specify --force to override.
statistics_collector: /opt/psa/admin/sbin/relink-vhost-logs execution failed:
ERROR: Cannot relink logs. Target directory '/var/www/vhosts/domain.tld/logs' is in invalid state.

EDIT: I discovered the error... The reason was in /etc/passwd... I had to change the order of the accounts for domain.tld. First, the mainaccount of the domain has to be mentioned and only thereafter the semadmin... I got in the wrong order...
 
Last edited:
Is there an open bug for this issue? It is still occurring six months later. It will occur every time a customer changes their primary FTP/SSH username if they also have auxiliary accounts, since the new entry moves down to the bottom of the passwd file, putting the other non-primary FTP users further up.
 
I can't get existing domains to work even after moving the sub accounts to lower in the passwd file, running
/usr/local/psa/bin/repair --update-vhosts-structure and running
# /usr/local/psa/bin/repair --restore-vhosts-permissions. Just still spits out the 'already exists, but has wrong access rights' error repeatedly.
nscd is not being used.
 
Back
Top