Ftp user can access "/" after being removed from shell user

Discussion in 'General' started by Alex1337, Dec 10, 2019.

  1. Alex1337

    Alex1337 New Member

    Hello,

    I had to setup a shell user for a developper to run a php command.
    By default it's not possible to run php command in jailkit so i didn't put one.
    Now operation is finished but even after removal of shell user the ftp user still have access to everything.
    How do i need to do fix this? Is it normal?

    Regards
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This is not normal. Please post the line of the matching webXX user of that site from /etc/passwd file.
     
  3. Alex1337

    Alex1337 New Member

    web56:x:5047:5005::/var/www/clients/client1/web56/./home/web56:/usr/sbin/jk_chrootsh
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to change it back to:

    /var/www/clients/client1/web56:/bin/false

    and test if it works now.
     
  5. Alex1337

    Alex1337 New Member

    I have done usermod -s /bin/false web56
    It's look ok, i still see /usr /home /etc /var etc but it's empty, i have restarted pure-ftpd-mysql but i still see those folders is it normal? Is it possible to make them disappear as it was before ?
    Thanks for reply
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ahh, ok. Now I know what the issue is or in other words, there is no issue at all. The folders that you see are part of the website, it's the jail. You don't see any system folders and you don't have access to the whole system as you thought, so FTP is and was working as it should be. The jail stays there even if you remove the last jailed user, that's intended to ensure that your site will not break.
     
  7. Alex1337

    Alex1337 New Member

    Ho ok got it, thanks !
     

Share This Page