• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Web/FTP Servers and Users

Joined
May 16, 2008
Messages
1,258 (0.22/day)
Location
North Carolina
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.
 
Last edited by a moderator:

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,436 (2.43/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
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?
 
Joined
May 16, 2008
Messages
1,258 (0.22/day)
Location
North Carolina
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

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,436 (2.43/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
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.
 
Last edited:

Completely Bonkers

New Member
Joined
Feb 6, 2007
Messages
2,576 (0.41/day)
Processor Mysterious Engineering Prototype
Motherboard Intel 865
Cooling Custom block made in workshop
Memory Corsair XMS 2GB
Video Card(s) FireGL X3-256
Display(s) 1600x1200 SyncMaster x 2 = 3200x1200
Software Windows 2003
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.
 
Joined
May 16, 2008
Messages
1,258 (0.22/day)
Location
North Carolina
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?

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.
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?
 
Last edited:

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,436 (2.43/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
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.
 
Joined
May 16, 2008
Messages
1,258 (0.22/day)
Location
North Carolina
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.
 
Last edited:

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,436 (2.43/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
hrm, you should probably read some of the documents on this. there are so many variables at this point i may confuse you.
 
Top