• 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.

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