Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Webserver users
Results 1 to 7 of 7

Thread: Webserver users

  1. #1
    Advisor
    Join Date
    Apr 2002
    Posts
    858

    Webserver users

    I have apache / PHP / mysql running, and am now planning on hosting a few websites for people, what I would like to do, is give them a username so they can ftp to their home dir, and ssh to it, but so that they can't see anywhere else on the server. Bascially i want them to have full access in their home dir (/var/www/htdocs/usernam) and nowhere else, not even read priveleges. Will I have to chmod o-r the whole filesystem to do this, or is there an easier way?

  2. #2

    Re:Webserver users

    Look for the chroot (change root) HOWTOs. If you are using protfpd as your ftp package, jailing a user into their home directory is very very easy. Look at proftpd's online documentation. It's very straightforward.

    I'm pretty sure you can also chroot with ssh as well, though I have never tried to do it.

    A third senario is to set up a restricted shell in which you define not only what permissions users have to their home directories, but also what actual commands they can run (you can, for instance, only allow users to do an 'ls' and nothing else if you want).

    If you want the code for the restricted shell, let me know and I'll post it. Using chroot, however, is probably the best solution.

  3. #3
    Advisor
    Join Date
    Apr 2002
    Posts
    858

    Re:Webserver users

    Thanx for the info, i'll give it a shot and let you know the results.

  4. #4

    Re:Webserver users

    [quote author=PK link=board=4;threadid=5848;start=0#55798 date=1039833808]
    Thanx for the info, i'll give it a shot and let you know the results.
    [/quote]

    If you're using proftpd let me know. I can help you set your chroot on it. I curently use it to jail my web developer into our webserver's document root so that he cannot browse the entire file system from an ftp session. I believe it is a very comon setup. Most people use chroot on ftp servers that allow anonymous access (or any access for that matter).

  5. #5
    Advisor
    Join Date
    Apr 2002
    Posts
    858

    Re:Webserver users

    Indeed I am using proftpd

  6. #6

    Re:Webserver users

    Setting the chroot jail should be as simple as adding:

    Code:
    DefaultRoot     ~
    to your proftpd.conf either as a global option or to your specific virtual servers. After that, set each home user's directory to their webserver's document root in /etc/passwd.

    That should be all there is to it.

  7. #7

    Re:Webserver users

    Kind of off topic: Could chroot be used to make a dmz on a router box? I was thinking it would be cool to have a family web server on my router box.

Similar Threads

  1. webserver
    By aimseeker in forum Linux Distros
    Replies: 2
    Last Post: 02-11-2010, 04:53 PM
  2. My Webserver
    By beezlebubsbum in forum Linux - Software, Applications & Programming
    Replies: 18
    Last Post: 08-23-2005, 06:19 AM
  3. WebServer
    By vwgtiturbo in forum Linux - Software, Applications & Programming
    Replies: 16
    Last Post: 10-23-2003, 05:30 AM
  4. Webserver
    By trickster in forum Linux - Hardware, Networking & Security
    Replies: 7
    Last Post: 08-27-2002, 01:24 AM
  5. Webserver Accounts
    By xin in forum Linux - Hardware, Networking & Security
    Replies: 13
    Last Post: 06-28-2002, 09:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •