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

Web/FTP Servers and Users

Discussion in 'Linux / BSD / Mac OS X' started by angelkiller, Jan 18, 2011.

  1. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    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: Jan 18, 2011
  2. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,201 (4.87/day)
    Thanks Received:
    3,126
    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?
  3. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    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.)
  4. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,201 (4.87/day)
    Thanks Received:
    3,126
    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: Jan 18, 2011
  5. Completely Bonkers New Member

    Joined:
    Feb 6, 2007
    Messages:
    2,580 (0.98/day)
    Thanks Received:
    516
    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.
  6. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    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 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: Jan 18, 2011
  7. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,201 (4.87/day)
    Thanks Received:
    3,126

    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.
  8. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    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: Jan 18, 2011
  9. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,201 (4.87/day)
    Thanks Received:
    3,126
    hrm, you should probably read some of the documents on this. there are so many variables at this point i may confuse you.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page