• 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

Plesk update fails when using NAS disk for Plesk Backups

gbotica

Regular Pleskian
Hi,

My server is a VMWARE Cloud Server, CentOS 6.7, Plesk 12.0.18.

My main disk was getting full, but rather than add more space to the main drive, I decided to get a NAS drive and move my Plesk Backups onto there (it's much cheaper, and I'll only use it for backups)

I mounted the NAS share to /media/nas/, this is my fstab config (which appears to work and mounts the share OK) (details removed):

Code:
//SERVER/SHARE /media/nas/ cifs username=USERNAME,password=PASSWORD,uid=0,gid=0 0 0

Once it was mounted, I then created a directory: /media/nas/dumps.

I then updated /etc/psa/psa.conf, changing the DUMP_D accordingly:

Code:
DUMP_D /media/nas/dumps

I left DUMP_TMP_D unchanged:

Code:
DUMP_TMP_D /tmp

All this seemed to be working perfectly, I can run Plesk backups and they appear on the drive. I can create backups and remove them, all from the Plesk Admin.

Then, yesterday, Plesk tried to run an automatic update and it failed. Plesk attempts to make a backup of the MySQL database and then CHOWN the file, but it fails with a permission error. Everything else in the install log looks fine, this is the error:

Code:
Stopping psa... Stopping sw-engine-fpm: [ OK ]
done
chown: changing ownership of `/media/nas/dumps/mysql.preupgrade.12.0.18-12.0.18.20150926-222125.dump.gz': Permission denied
tac: write error
tac: write error

When I refer back to the original Plesk backups location, /var/lib/psa/dumps -- I see that the /var/lib/psa/dumps directory has owner / group set as psaadm / psaadm, while all the backup files within this directory are all 0600 root / root. I tried changing /media/nas/dumps to psaadm / psaadm, but (not surprisingly) I get a permissions error. I note that my backup files in /media/nsa/dumps are all 0644 root / root.

So, everything inside /media/nas is set as root / root (as per my fstab config), but how do I then change a directory within that share to another user / group? Specifically, it would appear I need to change /media/nas/dumps to psaadm / psaadm to allow the Plesk autoinstaller to work.

Any help on getting this to work would be appreciated.

Thanks for your time.
 
Last edited:
P.S.

I just tried adding "users," to the fstab config:

Code:
//SERVER/SHARE /media/nas/ cifs users,username=USERNAME,password=PASSWORD,uid=0,gid=0 0 0

... but it didn't help, although the error in the log is slightly different now:

Code:
Stopping psa... Stopping sw-engine-fpm: [ OK ]
done
chown: changing ownership of `/media/nas/dumps/mysql.preupgrade.12.0.18-12.0.18.20150926-231240.dump.gz': Permission denied
tac: write error: Broken pipe
 
Back
Top