Silverstripe CMS (tuto) : pre-install question

Discussion in 'Installation/Configuration' started by Keoz, Sep 27, 2018.

  1. Keoz

    Keoz Member

    Hi

    I am about to install Silverstripe CMS as recommended on this tutorial:
    https://www.howtoforge.com/tutorial/ubuntu-silverstripe-cms/

    But I remember that for another website (web app) installation, I was recently advised on this forum not to “chown“ any website folders to apache “www-data“ user if I am managing my remote server from ISPCONFIG 3 control panel, because this may cause somme troubles on server.... I was contrarily advised to create a non-root shell user from ISPConfig 3 panel and to grant him access and permissions management rights on folders and files of the website.

    Is this indeed the same case for Silvestripe CMS!
    If yes, can I the skip “chown“ and “chmod“ command lines in the "Install Silverstripe CMS“ section of the tutorial ?
    Can I also quietly adapt the tutorial to my ISPConfig (paths to place or move content in a location)...?

    Regards,
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ISPConfig creates the website folders and files with correct owners and group owners, and correct permissions. Do not change them, it just causes a mess and you have to go back fixin them to get websites working again.
    You must also create FTP user and/or shell user for the website and use only those to upload files there and edit the files. Then the files and directories created get the correct owner and group owner.
     
    Keoz likes this.
  3. Keoz

    Keoz Member

    I do understand what you mean (here and in another thread) but I would feel more confident in my project of installing Silverstripe CMS if you can reply more directly to both my simple questions above (and reprecised hereafter) about following and adapting the tutorial when managing web contents from ISPConfig panel:

    • Can I the skip “chown“ and “chmod“ command lines in the "Install Silverstripe CMS“ section of the tutorial ?
    • Can I write paths as ISPConfig defines them for a web content or location: var/www/clients/client1/webXX/web....?

    It would be much more helpful to me to have direct replies.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The whole tutorial is not suitable or useful for use on an ISPConfig server, it is made for a standalone installation on a LAMP system without a hosting control panel.

    Installing SilverStripe in ISPConfig is easier than what's described in the guide you used. To Install SilverStripe on an ISPConfig server you just have to:

    1) Create a website in ISPConfig with PHP enabled.
    2) A MySQL database and database user in ISPConfig.
    3) Either download SilverStripe to your desktop and then upload it by ftp into the web dir of that site or download it with wget on the shell of your server into the web dir of the site and unpack it there. If you use the wget procedure instead of an ftp user of the site, then you might have to chown the files to the web user and client group of the site. So using FTP is probably easier for you.
    4) Point a browser to the website domain and follow the steps of the web installer in the browser.
     
    Keoz likes this.
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You should create a test machine where you can test and experiment with stuff.
    You must skip chown and chmod commands. I thought I made it clear using them breaks your website. Those may be needed on other setup, but with ISPConfig the website files and website users are created just so, and they work. But stop working if you change stuff.
    Write where? The settings you write to the CMS you install to your website or somewhere else? In your website CMS settings, the file system root it sees is the web root of the website. So / means the web/ directory in your website. The website should not be able to access the real filesystem with /var/www/clients/... .
     
    Keoz likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The tutorial from RoseHosting is a standalone tutorial like the one from howtoforge, so it is not suitable for an ISPConfig server as well as ISPConfig created the vhost already for you in the correct way, so if you follow the tutorial from rose hosting, you mess up your server setup. I posted the detailed steps to install silverstripe already in post #4 of this thread, just scroll up a bit and follow the instructions I posted.
     
  7. Keoz

    Keoz Member

    Hi Till,

    Thanks !
    Your replies also helps me to better understand and know precisely what functionalities ISPConfig server is covering !

    This extra questions are still in matter of my understanding of ISPConfig server:
    • Does the choice to add a shell user for a website mostly depend on the web app configuration, or on the way one's want to organise collaboration for web development?
    • How do I know if a particular web app can only be installed from an added shell/ftp user?
    • Would you advise to allways install any new web app, or website via added shell/ftp user?

    Regards,
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    It's up to you what your personal preference is, it does not depend on the CMS.

    All websites and apps can be installed by FTP and SSH.

    For users that are not that familiar with Linux administration and user rights, I highly recommend using an SSH or FTP user of the site instead of the root account.
     
    Keoz likes this.
  9. Keoz

    Keoz Member

    Hi,

    Silverstripe installation wizard page is displayed (with previous “date.timezone“ issue solved) ; but could any one tell me why this warning message is showing on top of the page ; and tell me if I should pay attention to it or not. If yes, what could be done to avoid it ?

    I replaced my subdomain name with : portal.mydomain.xt

    Warning
    : file_exists(): open_basedir restriction in effect. File(/var/www/clients/client1/web9/.env) is not within the allowed path(s): (/var/www/clients/client1/web9/web:/var/www/clients/client1/web9/private:/var/www/clients/client1/web9/tmp:/var/www/portal.mydomain.xt/web:/srv/www/portal.mydomain.xt/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) in /var/www/clients/client1/web9/web/vendor/silverstripe/framework/src/Core/EnvironmentLoader.php on line 24

    Regards
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    SilverStripe tries to access a file outside of the website, which it should not do. But you can probably get rid of the error message by appending this:

    ":/var/www/clients/client1/web9"

    (without the quotes) at the end of the string in the php open_basedir path of the website, you can find the setting on the options tab of the website in ISPConfig.
     
    Keoz likes this.
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Why is that CMS trying to access files one level towards file system root? Is there a setting that controls where it puts that .env file or directory? It seems to me this would always cause trouble if that CMS does this in every install.
     
  12. Keoz

    Keoz Member

    Worked fine, thank U Till !
    Is there now a risk that Silverstripe may access files outside of the website ?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    no.

    I can just guess, maybe it tries to read the environment file of the web user. But I've no idea why a cms should do that.
     

Share This Page