Change name of the website and user visible in the server console

Discussion in 'Installation/Configuration' started by Poliman, May 25, 2016.

  1. Poliman

    Poliman Member

    Hello
    I have two problems (ISPConfig 3.0.5.4p9):
    1. If I leave [CLIENT_ID] in System config:
    I would like to know how can I (if it's possible) change name web and client on the server. After creating some domain i.e. example.com and user i.e. exampleUser, on the server I have (in path - /var/www/clients) client2 and web1 (inside /var/www/clients/client2). I would like to change client2 for proper name of the user and this same with web1 directory. And of course not only for this user/web but for all created in future.
    -----------------
    2. If I change to [CLIENTNAME]:
    After creation user "piotr" and website "piotr.pl" I have Sites ->Website->Webdomain->Options shows three fields:
    Linux User equal to i.e. web8
    Linux Group equal to i.e. client16
    I would like to have Linux User as "piotr" and Linux Group as "piotr" too.
    PHP open_basedir equal to i.e.
    /var/www/clients/piotr.pl/public_html/web:/var/www/clients/piotr.pl/public_html/private:/var/www/clients/piotr.pl/public_html/tmp:/var/www/piotr.pl/web:/srv/www/piotr.pl/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
    In above lines is "piotr.pl". I suppose there should be "piotr", because this is a client. How could I change/fix it? Btw i haven't "piotr" directory in path /var/www/clients. There is directory \[website_domain\] which can be opened only by root. Inside it is public_html directory -> home -> here are two directories: one "piotrpiotr" (created shell user) and web8. Both are empty. Full path is quite strange: /var/www/clients\[website_domain\]\public_html\home.

    When I try log into server using Putty and login/pass which were created earlier, after hit Enter button console always close. I can log only as admin user, who was created when I installed server. When I create shell user I choose Chroot Shell - Jailkit.
     
    Last edited: May 25, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The ID's are required and can not be changed. ISPConfig creates symlinks automatically so you can navugate to the website on the shell by using the website name and not the technical internal ID. Using a name instead of an ID is not possible as the value needs to be unique and unchangable to prevent that the sites dont break when a user changes the domain name or his username.

    You used invalid placeholders in the path and therefore the path is wrong and your system is broken now. Undo all changes that you did under System > server config and restore the original path settings and delete the broken website.
     
  3. Poliman

    Poliman Member

    Thank You for answer.
    Message above iclude few problems:
    1. Impossible to log into created shell user. After hit enter button console close.
    2. Linux User and Linux Group can not be i.e. piotr and piotr after create client "piotr", only i.e. web8 and client16?
    3. Path can not be /var/www/clients/piotr (username of created user), only /var/www/clients/piotr.pl (name of created website belongs to client piotr)?
    4. No difference between chroot user and non chroot (setting when creating user). Jailkit installed. Nothing changed in settings.
    5. Is it possible to create client as a linux user (after creation, like user created by command "adduser" with his directory inside /home)?
    I will appreciate to step by step solution as a newbie user.

    I changed only one thing: System-> Interface -> Main Config -> Sites
    Here are two fields:
    Database name prefix and Database user prefix and I changed them from [CLIENT_ID] to [CLIENTNAME].
    Where could I find settings of placeholders, place which I put above? Is there any more places where is possibility chage placeholders?
     
    Last edited: May 25, 2016
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not use volatile (changeable) variables like a username for website users or paths of websites as this will break your website as soon as someone would change it's username. That's why only unchangeable ID's are used in paths. For easy shell navigation, ispconfig creates symlinks to these technical paths, so you don't have to remember any ID's and just use e.g. cd /var/www/yourdomain.tld to enter the website directory.

    The same apply to the website users, these users never get used for logging in, they are just there for technical reasons and you don't have to know or remember their names. For FTP or shell login, you just use the username of the user that you created in ispconfig and not a webX user.

    The placeholders of the fields are described in the ISPconfig manual.

    These are not paths from ispconfig. Maybe you installed another controlpanel and did not reinstall the server to clean it up before you installed ispconfig or you changed the default paths under System > Server config as ispconfig never has a public_html directory nor directorys with a name like piotr. there are just symlinks for easy navigation with real names.

    The paths of an ispconfig setup are:

    Directory:

    /var/www/clients/client[ID]/web[ID]/web

    Symlinks:

    /var/www/domain.tld => /var/www/clients/client[ID]/web[ID]
    /var/www/clients/client[ID]/domain.tld => /var/www/clients/client[ID]/web[ID]

    If yu create a shell user in ispconfig, then this user has its home directory under /var/www/clients/client[ID]/web[ID]/home/username
     
  5. Poliman

    Poliman Member

    I didn't install any other panels except update from version 3.0.5.4p8 to 3.0.5.4p9. Before update it works well except adding shell user, because I didn't test it then.
    Exactly, there isn't directory piotr but webX. Is it possible to use username as directory name not webX?
    As you said:
    /var/www/clients/client[ID]/web[ID]/web
    I would like to:
    /var/www/clients/name_of_created_client/name_of_created_website/web, e.g.
    /var/www/clients/piotr/piotr.pl/web

    Shell user with or without checked Jailkit option has home directory in path /var/www/clients/client[ID]/web[ID]/home/username ? I tried check both options and it works this same.

    In my ISPconfig3 System->Server Config->Web are:
    Website path = /var/www/clients/[website_domain]/public_html
    Website symlinks = /var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
    I can show You all paths which You will want.

    "If yu create a shell user in ispconfig, then this user has its home directory under /var/www/clients/client[ID]/web[ID]/home/username" - in this home directory user neither any file nor configured web domain. I compare this with DirectAdmin. There any user has directory /home/username/domains/example.com/public_html
     
    Last edited: Jun 3, 2016
  6. Poliman

    Poliman Member

    Could anybody help me with this mess?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    What did I post in #4 how the path must look like? Compare your path with the path that I posted in #4 and you can see that yours is wrong and can't work as you use nonexisting and dynamic variables. I explained that already in post #4 why you can't do that so I don't want to repeat myself here.

    And that's your problem. ISPconfig has a different folder scheme than Directadmin. Directadmin uses a folder scheme /home/username/... that is used normally on Desktops and not servers. ISPConfig uses a server folder scheme in /var/www and bases the folders on websites like it is done on larger hosting systems.

    You want ispconfig to mimic the desktop scheme of directadmin and this will not work off course, directadmin is also not able to mimic ispconfigs hosting server scheme. So if you want to use directadmin, then use directadmin. If you want to have a scalable and secure setup, then use ISPConfig and don't mess around with the proven folder structure that ispconfig uses.
     
    Last edited: Jun 3, 2016
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    To repair your system:

    1) Delete all websites that you created with the wrong path setup.
    2) Then go to system > server config and enter the following paths:

    Webseiten basedir: /var/www
    Website path: /var/www/clients/client[client_id]/web[website_id]
    Website Symlinks: /var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/

    and save the configuration.
     
  9. Poliman

    Poliman Member

    Thank You for answer. I checked Server Config and I am shocked. Each input field there is empty and checkboxes are unchecked. I only changed pathes which You mention. Is it possible to crash all after update to higher version? I do this in testing environment, but soon I would like to update production but I really don't want crash it.
    I checked all paths with production server and put them to testing. I have this bug https://www.howtoforge.com/communit...web-error-nginx-vhost-config-dir-empty.70465/
    It looks like:
    Nginx Vhost config dir is empty.
    Invalid nginx config directory.
    Nginx Vhost config enabled dir is empty.
    Invalid nginx conf enabled directory.
    Nginx user is empty.
    Invalid nginx user.
    Nginx group is empty.
    Invalid nginx group.
    Nginx CGI Socket is empty.
    nginx_cgi_socket_error_regex

    I have the newest version of ispconfig3.

    EDIT
    I did what wrote guy in above link - add some lines to config field in database. Now this problem is resolved. But there You wrote that this was bug in p7 version. I updated to p9 and Web config disappear. Now I am trying resolve - as You said in post above.
    What is default shell user directory when Jailkit installed?
     
    Last edited: Jun 9, 2016

Share This Page