chroot and file permissions

Discussion in 'Installation/Configuration' started by newmember, Dec 24, 2008.

  1. newmember

    newmember New Member

    This was kind of interesting, I added chroot to my sshd.
    And I changed my Management->System Config->User Prefix: to user[WEBID]_ from web[WEBID]_.

    Now when I create a new user I get a folder:

    Code:
    /var/www/web15/user/user15_chrisw/
    and in this folder I get all the standard folders. What is interesting is that all the folders in that directory are owned by root and not user15_chrisw or group web15.

    It was just interesting, I noticed that I was uploading files to what I thought was my website:

    Code:
    /var/www/web15/web
    but I was actually uploading them to
    Code:
    /var/www/web15/users/user15_chrisw/web

    Code:
    root@server-isp:/var/www/web15# ls -l
    total 24
    drwxrwxr-x 2 root web15 4096 2008-12-23 20:26 cgi-bin
    drwxr-xr-x 2 root web15 4096 2008-12-23 20:26 log
    drwxrwxrwx 2 root web15 4096 2008-12-23 20:26 phptmp
    drwxr-xr-x 2 root web15 4096 2008-12-23 20:26 ssl
    drwxr-xr-x 3 root web15 4096 2008-12-23 21:13 user
    drwxrwxr-x 3 root web15 4096 2008-12-23 20:26 web


    Code:
    root@server-isp:/var/www/web15# ls -l user/
    total 4
    drwxr-xr-x 11 user15_chrisw web15 4096 2008-12-23 21:18 user15_chrisw
    Code:
    root@server-isp:/var/www/web15# ls -l user/user15_chrisw/
    total 32
    drwxr-xr-x 2 root          root  4096 2008-12-23 21:13 bin
    drwxr-xr-x 2 user15_chrisw web15 4096 2008-12-23 21:18 chrisw
    drwxr-xr-x 2 root          root  4096 2008-12-23 21:13 dev
    drwxr-xr-x 4 root          root  4096 2008-12-23 21:14 etc
    drwxr-xr-x 4 root          root  4096 2008-12-23 21:14 lib
    drwxr-xr-x 4 root          root  4096 2008-12-23 21:13 usr
    drwxr-xr-x 3 root          root  4096 2008-12-23 21:14 var
    drwxrwxr-x 2 user15_chrisw web15 4096 2008-12-23 22:58 web
     
    Last edited: Dec 24, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    You must check the administrator checkbox for that user. Afterwards he can upload to /var/www/web15/web.
     
  3. newmember

    newmember New Member

    Is it ok with ISPconfig to edit the /etc/passwd file directly to allow multiple people to have access to /var/www/web15/web ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, ISPConfig will remove your changes automatically.
     

Share This Page