Welcome to WebmasterWorld Guest from 54.226.147.190

Forum Moderators: bakedjake

Message Too Old, No Replies

Usernames, /var/www/html etc.

     

teasers

2:51 am on Feb 13, 2007 (gmt 0)

10+ Year Member



Hi there,

I am deciding to move to a new dedicated server, without using a control panel (Ensim) this time..

The problem is I don't know much about first things to do. Yes, I know hoe to handle SSH, the apache config file, I use nano, etc. but...

The server will host just one website, so there's no need for virtual hosts and I will use directly /var/www/html as the upload directory, but the question is that do I have to create a user for that?

I mean, I have checked the files on my current server and they're owned by root, will I use that directory as root? And what will happen when using an FTP client? It will ask me a user & pass for uploading stuff in there, so how to handle this?

I'm making searches on the net for days, but what I've reached is tons of "How to set up a Linux server", "How to set up Fedora", but none of them is talking about the things I need to learn.

- Do I have to create a user (how and exactly with which directives)
- Do I have to chown some directories, which one and how?
- How will I create the e-mail accounts (from within the MTA, or do I have to create one user at the system for each e-mail account)

Those are some questions which I couldn't get an answer.

I will be pleased if someone can guide me, or drop a link which will answer those questions.

regards

teasers

3:31 am on Feb 13, 2007 (gmt 0)

10+ Year Member



Or... They will be owned by root:root, but I will chmod them..
But how to upload? With which username and pass?
Thank you..

wheel

4:19 am on Feb 14, 2007 (gmt 0)

WebmasterWorld Senior Member wheel is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yes, you need to create a user. Don't do everything as root. It's a security issue - if someone owns you through your site, they could end up as root instead of the user. Baaaad.

You should be able to run something like 'adduser' or 'useradd' to add users automatically. That should create a user directory in /home. And then you login/ssh/etc with that user. The /home/user directory should have the permissions already set (i.e chown) when you do it this way.

In apache, then all you need to modify is the document root in a couple of places in httpd.conf instead of having a vhosts file.

I've forgotten how to add an email account, but I know on my linux system it's a single command. Googling 'linux add new email account' or something should get it for you.

In short, do everything as if you only had a user account. Root is for admining the server, not websites and email accounts.

You might also consider installing webmin to help you with the administration. In addition, on my system I can admin (including package updates and stuff) using a server admin package called 'drakconf'. It's hella handy. Fedora must have something similiar.

You also need to do the following if you're running your own server:
- have a process in place to keep your packages updated. Mandriva has urpmi, other packages have something similiar
- get automated backups going
- do a 'ps aux' to list all running processes. Then do some googling until you know what each and every process is for. Then turn off everything you don't use or need.
- put up a firewall, so that the system only listens on the ports you need (like 80 for apache, and so on).

 

Featured Threads

Hot Threads This Week

Hot Threads This Month