• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved DrWeb Update Can not open file '/var/drweb/updater/last_try_cache' for writing

Sphin

New Pleskian
Hi,

on the command line

su drweb
/opt/drweb/update.pl

runs fine without any problems. As soon as I try to run it from cron both from the plesk task scheduler or manually from /etc/cron.d/drweb-update (of course with the user drweb each) I get an error:

-----
ERROR: Dr.Web Updater: Failed to delete file: /var/drweb/updater/drweb/data/1 (Permission denied) at /opt/drweb/update.pl line 4399.

Can not open file '/var/drweb/updater/last_try_cache' for writing: (Permission denied) at /opt/drweb/update.pl line 4051.
-----

I checked the permissions already as stated in https://kb.plesk.com/en/125041 and they are ok. Any ideas?

Thanks, Sphin

PLESK 12.5.30
Ubuntu 14.04
 
Last edited:
Hi Sphin,

pls. post the output of the command:

ls -ld /var/drweb/updater/drweb/data/1 /var/drweb/updater/drweb/data /var/drweb/updater/drweb /var/drweb/updater /var/drweb /var ; ls -lZ /var/drweb/updater/last_try_cache

... and pls. add as well the content of the file "/etc/drweb/drweb32.ini".
 
Hi,

thanks for your fast reply.

ls -ld /var/drweb/updater/drweb/data/1 /var/drweb/updater/drweb/data /var/drweb/updater/drweb /var/drweb/updater /var/drweb /var ; ls -lZ /var/drweb/updater/last_try_cache

drwxr-xr-x 17 root root 4096 May 18 20:34 /var
drwxr-xr-x 13 drweb drweb 4096 May 8 02:33 /var/drweb
drwxr-xr-x 4 drweb drweb 4096 May 8 08:42 /var/drweb/updater
drwxr-xr-x 3 root root 4096 May 28 06:41 /var/drweb/updater/drweb
drwxr-xr-x 2 root root 4096 May 28 06:41 /var/drweb/updater/drweb/data
-rw-r--r-- 1 drweb root 363405 May 28 06:41 /var/drweb/updater/drweb/data/1
-rw-r--r-- 1 root root ? 0 May 28 06:41 /var/drweb/updater/last_try_cache

... and pls. add as well the content of the file "/etc/drweb/drweb32.ini".

I'm not allowed to because the limit of characters of a post here has been exceeded. So I attach the file. I must rename the file from .ini to .txt because .ini is not an allowed extension. I didn't edit anything in this file by myself.

Thanks, Sphin
 

Attachments

  • drweb32.ini.txt
    10.7 KB · Views: 3
Hi Sphin,

I don't see any misconfiguration at the moment, so I would suggest two quick&dirty work-around, which might solve your issue:

First, pls. try to run the updater without sudo:

/opt/drweb/update.pl

or/and with the *.ini - file parameter:

/opt/drweb/update.pl --ini=/etc/drweb/drweb32.ini

If this didn't work as expected, you might consider to un- and re-install DrWeb:

Uninstall DrWeb:
/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --remove-component drweb

Re-install DrWeb:
/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component drweb​
 
Hi,

thanks, but there is one thing I don't understand (okay, my try with "su drweb" was not really effective if drweb did not have a shell (/bin/false), so I executed the script as root and therefore I had no problems with permissions):

-rw-r--r-- 1 root root ? 0 May 28 06:41 /var/drweb/updater/last_try_cache
These permissions are really right? The error from cron was:
Can not open file '/var/drweb/updater/last_try_cache' for writing: (Permission denied) at /opt/drweb/update.pl line 4051.

How should the user drweb be able to write to this file owned by root:root with 644?

Thanks, Sphin
 
Okay, after checking all options from above and even trying to play a bit with the permissions of drweb's files I come to the conclusion that actually the only way to get a propper update via cron is to start the job as root. That's not the best solution but also not a tragedy as far as I can see.
 
Back
Top