Create subdomain for moodle installation with it's own user access

gonzalomassa

Verified User
Joined
Feb 24, 2015
Messages
6
Hi everyone :)

I want to setup a subdomain in a way that it has its own user on the server, but I don't know what's the best way and what features can I offer to that user.

I've searched the forums for similar questions, but all the solutions I found were more related to create resellers that will set up websites under different subdomains. So let me explain what's the use case first:

- The server is a VPS with centos-7.3-x86_64, directadmin 1.55.0 and custombuild 2.0.0 (rev: 2005)
- It's not meant for hosting services or resellers, it's just our own website's server.
- I have only the root & admin user combo, and only our main domain (ie: domain.com) configured.

Now, an external developer will be installing, updating and maintaining an e-learning section (using Moodle) into our website, and we would like to do it as follows:

- Have Moodle installed at moodle.domain.com
- Give the developer FTP access to upload files to that subdomain, but not outside of it (I understand subdomains are just folders under the main domain public_html folder).
- The problem is that if I don't give him access outside the subdomain's path, he will not be able to handle the "moodledata" folder that must be placed outside the public folder.
- Also I wonder if I can give ssh + directadmin access (to make backups, create databases, etc) but all scoped to his user and subdomain, in other words, not give him root nor admin access, and block all access to our website files.

The last requirement (ssh + directadmin access) is a wish but I'm ok if it's not possible, in that case I'll create the databases for him and make the backups when necessary.

Can you please guide me no this? I don't know if I have to take the road of manually creating FTP users, set permissions, create databases and MySQL users, or if there is a easier way like create the subdomain and a new DA user for the developer so he can create the databases, ftp users, etc while maintaining the restrictions so he can't do anything outside the subdomain.

Thank you in advance (really), and sorry for my english.

Please let me know if you need more information to be able to help me.
 
Hello,

As a reseller in Directadmin create a new user with a domain for moodle. A separate new user will be limited with access to that only domain.

Document root will be set to /home/user/domains/moodle.domain.com/public_html/, and anything abnove the folder is already outside the document root.

An user will have access to /home/user/ with FTP and DIrectadmin file manager.

You don't need to give the user SSH access, leave it unchecked when creating a new user.
 
Hi zEitEr

Thank you for your response, I've tried and it worked well. That was exactly what I was looking for, you really really saved my day!

Have a nice day :)
 
Back
Top