# Web/FTP Servers and Users



## angelkiller (Jan 18, 2011)

Terrible title, but I couldn't think of a better way to explain the situation.

So, for fun, I've set up a LAMP server in Virtualbox. Running Arch Linux. Everything seems to be working ok.

*My question is how do I set up users and groups for the various processes I have running?*

I just want to be able to log in via FTP and transfer files to the root of the Apache Server.

So far, I've had several issues. First, I made the Apache server's document root a folder in another user's home directory. I did this so when I log in via FTP of the 2nd user, I can get to that folder. But I don't think Apache has permissions to that folder, so the website stopped working.

I know there are several ways of accomplishing this, I just need one. Nothing is set in stone and I can change whatever. I'm pretty confused as how I would go about my issue.

Thanks.


----------



## Easy Rhino (Jan 18, 2011)

do you want to setup separate accounts for ftp users or do you want your shell users to have ftp access using their shell credentials? the second way is the easiest in linux although i have never tried it with arch. 

after you changed the dir in apache from /var/www to whatever did you restart apache?


----------



## angelkiller (Jan 18, 2011)

Easy Rhino said:


> do you want to setup separate accounts for ftp users or do you want your shell users to have ftp access using their shell credentials? the second way is the easiest in linux although i have never tried it with arch.
> 
> after you changed the dir in apache from /var/www to whatever did you restart apache?


Errrr... The server is only for me right now. There won't be any other users. (yet) I'm looking for the most basic ftp setup. I just need a way to transfer the files for the website to the server. But, I still want to make the server secure, as if this were a real production server. So I want to do things the 'right' way instead of hacking together some solution.



I forgot to change something that I was testing in the Apache config. It's working now with a document root of /srv/http. (It also worked when the document root was in a user's home directory, but I want a centralized location.)


----------



## Easy Rhino (Jan 18, 2011)

well if the ftpd is just for you then install an ftpd and login using your shell credentials. not root. depending on your config file you may be locked in your home dir so take that into consideration. also, having your www root in your home dir is fine so long as if you have a strong password.


----------



## Completely Bonkers (Jan 18, 2011)

I have a similar setup... remote server, running FTP and website, and I want to occasionally get "into" the server to run updates, change root files, etc.

The BEST way is to use Dameware's Remote Mini Remote Control.  But it is for a Windows OS.

Last year I made a tough decision: Linux server (near zero software cost, but with a long and time consuming learning curve... this isnt my day job... or have to pay for support person) or use a Windows server (with very short and low curve, since I know Windows well).  I went for Windows.

You can install IIS6.0 onto an old XP license that will turn it into a webserver and FTP.


----------



## angelkiller (Jan 18, 2011)

Easy Rhino said:


> well if the ftpd is just for you then install an ftpd and login using your shell credentials. not root. depending on your config file you may be looked in your home dir so take that into consideration. also, having your www root in your home dir is fine so long as if you have a strong password.


Ok. When you say "my shell credentials", what do you mean? I don't have a particular user account. I've just been using the root account. Do I need a non-root account that will be used only for FTP login?

And also, what user accounts are Apache and the FTP server supposed to be run under? And does the user group matter at all?



Completely Bonkers said:


> I have a similar setup... remote server, running FTP and website, and I want to occasionally get "into" the server to run updates, change root files, etc.
> 
> The BEST way is to use Dameware's Remote Mini Remote Control.  But it is for a Windows OS.
> 
> ...


I like the way Linux works. I feel like I learned a lot more if I struggle through it. But if my resources were limited (time) I just might do something on Windows.

Could you explain what IIS6.0 is?


----------



## Easy Rhino (Jan 18, 2011)

angelkiller said:


> Ok. When you say "my shell credentials", what do you mean? I don't have a particular user account. I've just been using the root account.




ok, with arch i am guessing when you installed it you entered a pass for root. now you need, for security purposes, a separate account that you can login to and then get super user privileges. creating one is easy.



> And also, what user accounts are Apache and the FTP server supposed to be run under? And does the user group matter at all?



it depends on how you want to run it. some admins like to create separate groups for their services. it is generally more secure when you are in an enterprise environment. but if this is just a home server you dont have to go through the hassle if you dont want to.


----------



## angelkiller (Jan 18, 2011)

Easy Rhino said:


> ok, with arch i am guessing when you installed it you entered a pass for root. now you need, for security purposes, a separate account that you can login to and then get super user privileges. creating one is easy.
> 
> it depends on how you want to run it. some admins like to create separate groups for their services. it is generally more secure when you are in an enterprise environment. but if this is just a home server you dont have to go through the hassle if you dont want to.


Ok, I made a 2nd non root account. Now when I log in via FTP using this 2nd non-root account, I'm in /home/<user>. I need this to be /srv/http. Would I change this via the FTP program or by changing the user's home folder to /srv/http? *Edit* Ok, I figured this part out. I did this through the ftp server's config file. (/etc/proftpd.conf in my case) You have to use the "DocumentRoot" variable.

Could you explain some of the different ways to manage users, groups and processes? Thanks.


----------



## Easy Rhino (Jan 18, 2011)

hrm, you should probably read some of the documents on this. there are so many variables at this point i may confuse you.


----------

