/var/vhome/ under /var/www/clients/clientn/webn/var/vhome?

Discussion in 'Installation/Configuration' started by Richard Foley, Jul 20, 2019.

  1. Richard Foley

    Richard Foley Member

    hi, I have a situation which looks very odd to me. It's possible I've done something simple (wrong) or the configuration is awry. Either way, I've ended up with /var/vhome/ under the clients/ directory structure. Also there's a stray /home/ directory under web4/. What I am expecting is

    /var/vhome/
    /var/www/​

    However, what I have is:

    /var/vhome/ # <- 1. this directory is empty!
    /var/www/clients/client7/web4/var/vhome # <- 2. expecting this to be the top level /var/vhome/ dir?
    /var/www/clients/client7/web4/var/vhome/ecshelluser
    /var/www/clients/client7/web4/var/vhome/ecshelluser/.ssh
    /var/www/clients/client7/web4/var/vhome/web4
    /var/www/clients/client7/web4/home # <- 3. and now /home/ as well as /vhome/?!​

    Is this expected? Is there an easy way, (if this is in fact a problem), to fix this? I think I can probably simply do `mv /var/www/clients/client7/web4/var/vhome/* /var/vhome/`. However, I'm concerned there may be hidden behaviour (via configs/symlinks and the like) that I might disturb, and are there associated database entriese I need to fix at the same time? I'm also not quite clear how this came about...

    Many thanks in advance for any helpful assistance.
     
    Last edited: Jul 20, 2019
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I am not sure about /var/vhome but /home /var /web etc for clients are always be under their websites root folder.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the settings under System > server config to ensure that you did not use /var/vhome anywhere there. Seems as if /home directory on your server became /var/vhome for whatever reason.
     
  4. Richard Foley

    Richard Foley Member

    hi Ahrasis and Till,
    thanks for your feedback.
    I found System->Server_Config->Jailkit->chroot_home:
    /var/vhome/[username]​
    Now this looks odd, as I would expect that to be:
    /var/www/clients/client[client_id]/web[website_id]​
    or even one level up:
    /var/www/clients/client[client_id]/​
    Maybe this explains it. Not sure how that happened..., but maybe your new config-data-difference-tool will help to prevent this kind of thing in future!
    o_O
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The datalog viewer can (and shall) not prevent that an admin changes server settings on his server ;) it can just show you when and what was changed by which user.
     
  6. Richard Foley

    Richard Foley Member

    Yes, Till,
    that's actually what I meant, but my Dinglish got in the way o_O Thanks for the clarification though.

     
  7. Richard Foley

    Richard Foley Member

    Update: I think I nearly have this back to working now, with the Jailkit chroot path set to /home/[username]

    I'm probably (!) showing my ignorance of Jailkit here. However, when I ssh into this chrooted directory, the user is in an empty directory (except for the .ssh/ directory. I'd appreciate if someone could confirm whether this is correct?

    To go anywhere useful it seems necessary to execute first cd ../../../, as only then it's possible to see the contents of the client space eg:

    Code:
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    
    permitted by applicable law.
    
    Last login: Sun Jul 21 15:56:29 2019 from 91.126.35.66
    
    [email protected]:~$ ls -ail
    
    total 16
    
    565616 drwxr-xr-x 3 5007 5008 4096 Jul 21 10:34 .
    
    565611 drwxr-xr-x 5    0    0 4096 Jul 20 11:34 ..
    
    565617 -rw------- 1 5007 5008  142 Jul 21 10:34 .bash_history
    
    599218 drwx------ 2 5007 5008 4096 Jul 20 12:13 .ssh
    
    565620 -rw-r--r-- 1 5007 5008    0 Jul 20 11:35 it
    
    
    
    [email protected]:~$ cd ../
    
    [email protected]:/var/vhome$ ls -ail
    
    total 20
    
    565611 drwxr-xr-x 5    0    0 4096 Jul 20 11:34 .
    
    565607 drwxr-xr-x 4    0    0 4096 Jul 20 11:34 ..
    
    565612 drwxr-xr-x 3 5007 5008 4096 Jul 20 11:34 ecec
    
    565616 drwxr-xr-x 3 5007 5008 4096 Jul 21 10:34 ecshelluser
    
    565613 drwxr-x--- 2 5007 5008 4096 Jul 20 11:34 web5
    
    
    
    [email protected]:/var/vhome$ cd ../
    
    [email protected]:/var$ ls -ail
    
    total 16
    
    565607 drwxr-xr-x  4 0 0 4096 Jul 20 11:34 .
    
    541673 drwxr-xr-x 17 0 0 4096 Jul 21 00:04 ..
    
    565608 drwxr-xr-x  3 0 0 4096 Jul 20 11:34 run
    
    565611 drwxr-xr-x  5 0 0 4096 Jul 20 11:34 vhome
    
    
    
    [email protected]:/var$ cd ../
    
    [email protected]:/$ ls -ail
    
    total 68
    
    541673 drwxr-xr-x 17    0    0 4096 Jul 21 00:04 .
    
    541673 drwxr-xr-x 17    0    0 4096 Jul 21 00:04 ..
    
    541708 -rwxr-x---  1 5007 5008    0 Jul 21 15:52 .bash_history
    
    541709 -rw-r--r--  1 5007 5008    0 Jul 21 15:52 .profile
    
    541680 drwx------  2 5007 5008 4096 Jul 21 15:52 .ssh
    
    600791 drwxr-xr-x  2 5007 5008 4096 Jul 21 00:04 backup
    
    541713 drwxr-xr-x  2    0    0 4096 Jul 20 11:34 bin
    
    541678 drwxr-xr-x  2 5007 5008 4096 Jul 20 11:30 cgi-bin
    
    559392 drwxr-xr-x  2    0    0 4096 Jul 20 11:34 dev
    
    541710 drwxr-xr-x  6    0    0 4096 Jul 20 11:34 etc
    
    541706 drwxr-xr-x  4    0    0 4096 Jul 21 15:52 home
    
    541715 drwxr-xr-x  4    0    0 4096 Jul 20 11:34 lib
    
    541682 drwxr-xr-x  2    0    0 4096 Jul 21 00:03 log
    
    541681 drwx--x---  2 5007 5008 4096 Jul 20 11:30 private
    
    541674 drwxr-xr-x  2    0    0 4096 Jul 20 14:15 ssl
    
    541679 drwxrwxrwx  2 5007 5008 4096 Jul 21 12:51 tmp
    
    541725 drwxr-xr-x  6    0    0 4096 Jul 20 11:34 usr
    
    565607 drwxr-xr-x  4    0    0 4096 Jul 20 11:34 var
    
    541675 drwxr-x--x  8 5007 5008 4096 Jul 20 11:58 web
    
    [email protected]:/$
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's correct as it's the home directory of your shell user. Home directories are always empty. If you want to go to the websitre directory, just do:

    cd /web
     
    Richard Foley likes this.
  9. Richard Foley

    Richard Foley Member

    gotcha, that works just fine! :)

     

Share This Page