Automated Backup Specified Directory

Automated Backup Specified Directory

by Helen Thomas -
Number of replies: 1

Hi,


I have read several posts on this matter but I cannot find a solution to my problem and would like to see if anyone could please help:

We host our own Moodle 2.7 on Ubuntu 12.04. We would like to save our course back-ups to a mounted, external windows directory. We did in-fact have it working and now the same configuration seemingly doesn't work anymore - which I know is not possible so need to work out where have gone wrong.

I am sure it is a simple error - but just cannot see it.

Our specified path is set to /mountpoint/moodlefolder

But Moodle will not accept this path. I am sure the problem is permission based, but I am inexperienced with kind of set-up and would really appreciate some help advising what permissions should be set, and where. I have read that the moodle system user should have read/write and file creation rights to the folder - which is where I come unstuck. This is probably an Ubuntu/Windows question really - but if anyone has any advise please it would be welcome.


Helen.



 

Average of ratings: -
In reply to Helen Thomas

Re: Automated Backup Specified Directory

by david millians -

I can't believe nobody replied to this. This is easy.

In fact, you may have solved it already.

Unix file permissions by default are simple. They are read, write, and execute, for the user, the group he belongs to, and for everybody else.

Execute for directories means for going into the dir.

So, when you do a ls -al to show the full attributes for the dir you'll see:

drwxrwxr-x  3 wwwrun www 4096 Nov 27 10:33 backupdir

(I don't remember what the name of the virtual user for ubuntu is, but it'll probably be something similar to wwwrun.)

So the d is for directory, the rwx is read/write/execute for wwwrun, the virtual user that runs the web server. The second rwx is for the users who belong to the group www, of which wwwrun surely does. & the 3rd r-x is the permissions for everybody else on the system. A '-' means that other people can't write any changes.

So, you use the chmod and the chown commands to make changes to these. If i made a new called /newbackup, and then had to change it, I would do something like

chown wwwrun:www /newbackup

to make the ownership correct, and.

chmod a+rwx /newbackup
chmod o-x /newbackup

to make the permissions changes. Your exact commands will be different, but that should be enough info to get you started/googling for your specifics on ubuntu.

You can do all that, probably, without using the command line, but I definitely don't know how to do so on the GUI in ubuntu. I recommend, unreservedly, the book found at www.admin.com for linux new users, and it will explain all this in a way much better than I can. I also suggest a certain familiarity with the command line. Knowing it, for windows, linux, et al, is the path to knowing how to really get stuff done. Alas, it is still true and always will be, even with increasingly fancy gui interfaces.

Average of ratings: Useful (2)