homepage Welcome to WebmasterWorld Guest from 54.211.180.175
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Usernames, /var/www/html etc.
teasers




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

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




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

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




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

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).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved