Automated backup setup can't write in mounted folder (centos)

Automated backup setup can't write in mounted folder (centos)

by Mirko Đukić -
Number of replies: 3

Hi,

we are running moodle on cenos 6.6 and i am trying to set up Automated backup setup to a remote drive.

I made a mount on (new virtual) local drive:

mount /dev/vdb /var/www/backup/

(firstly i made mount on /mnt/backup and then symlink to apache folder. This is now, when testing, faster ...)

made owner apache: chown -R 48:48 /var/www/backup/

made (for testing) all rights on mounted drive folder: chmod -R 777 /var/www/backup/

In moodle WebUI "Automated backup setup" in "backup_auto_destination" is written: /var/www/backup/

Moodle can see folder (small green check mark) ... but returns "Some settings were not changed due to an error" and "The backup destination folder does not exist or is not writable".

If folder is not mounted, moodle can see and write. When i mount folder, i get error.

I don't know why moodle can't write in mounted folder.

Thanks for help!



Average of ratings: -
In reply to Mirko Đukić

Re: Automated backup setup can't write in mounted folder (centos)

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
The folder has to be mounted in a way that is writable. It does not need to be owned by the apache user - in fact it normally needs to be mounted with a user that has permissions on the remote server. Can you copy a file to the mounted folder from the moodle server manually?
In reply to Emma Richardson

Re: Automated backup setup can't write in mounted folder (centos)

by Mirko Đukić -
Yes. I can create/copy/send files on mounted folder from server.
In reply to Mirko Đukić

Re: Automated backup setup can't write in mounted folder (centos)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
During mounting (the mount command or /etc/fstab) you have to set parameter for it to be writable by a user. You can always test by doing something like (example Debian/Ubuntu):
$ sudo -u www-data touch /path/to/backup/xxx
$ sudo -u www-data mkdir /path/to/backup/yyy