• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Scheduled Task - Permission denied

JohnnyU

Basic Pleskian
Cloud VPS
OS - CentOS 6.5 (Final)
Panel - 11.5.30 Update #42

1. In Plesk i`ve setup a cronjob to backup a mysql database (tested from ssh - root and working):
mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` MYDB > /var/www/vhosts/MYSITE.com/httpdocs/bk/backup_`date +\%d.\%m.\%Y`.sql


2. first i ran:
/usr/local/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"


3. then i executed the cronjob and received email:
cat: /etc/psa/.psa.shadow: Permission denied
/bin/sh: /var/www/vhosts/MYSITE.com/httpdocs/bk/backup_21.04.2014.sql: Permission denied


4. and for another cronjob to delete older backups:
find /var/www/vhosts/MYSITE.com/httpdocs/bk -mtime +20 -type f -exec rm {} \;

similar error:
rm: cannot remove `/var/www/vhosts/MYSITE.com/httpdocs/bk/backup.08.02.2014.sql': Permission denied
 
Last edited:
Back
Top