Time for action — setting up the data directory
Let's see how easy it is to set up your data directory:
1. Make the data directory outside of the public folder of your home directory. Create the directory using the
mkdir
command and call ituploaddir:
mkdir uploaddir
Note
It doesn't really matter what you decide to call your
dataroot
directory, but try and choose a name that is relevant to what the directory is doing. The name suggested by Mahara and most commonly used isuploaddir
, but other names such asmaharadata
would be just as good.2. Set the permissions on this folder, using the
chmod
command:chmod -R 0777 uploaddir
3. Change the user of the new directory to be the same as your server, using the
chown
command. The user is usuallyapache
orwww-data:
chown -R www-data:www-data uploaddir
4. And that's all there is to it, you now have a place where Mahara can put all of the stuff belonging to your users.
What just happened?
You just created your data directory and made sure that it was in a safe place in your home directory outside of the htdocs
directory. Then you changed the permissions, users, and groups for the directory to make it easy for Mahara to put things in and to delete things.
Let's take a quick look at the file structure that you have just created for your Mahara installation:
So far, you have downloaded and put the Mahara files into place on your server, and seen how to create the database and dataroot needed to store all the Mahara information.