Wie wird der 'Wert für die open_basedir Richtlinie' richtig gesetzt?

  • Hallo,


    ich habe eine kleine Verständnisfrage zum 'Wert für die open_basedir Richtlinie' im iMSCP-Adminpanel.
    Ich habe hier den dev-Ordner noch eingefügt, da ich diesen für die OwnCloud-Installation freigegeben brauche.


    Nachdem ich den Wert '/dev/' eingetragen hatte wurden allerdings die php.ini Dateien nicht upgedatet - ist das so gewollt?
    Über perl /var/www/imscp/engine/setup/imscp-setup -dr php habe ich die Änderungen manuel in die php.ini Dateien geschrieben.
    Ich denke das könnte man automatisch beim speichern im iMSCP-Adminpanel starten, oder macht das keinen Sinn?
    Nur als Anregung.


    Dankegruß

  • Also wenn ich das eintrage und ein perl /var/www/imscp/engine/setup/imscp-setup -d ausführe, sind die Änderungen übernommen.


    Welche PHP-Umgebung nutzt Du? Ich setze PHP-FPM ein.

  • Hello ;


    Currently, it is not possible to customize the open_basedir parameter per customer, domain or site through the frontEnd, but it is possible to add a path in the default open_basedir parameter that is used while generating new php.ini files (see the admin/settings.php page). However, if you do that, you must be aware that this parameter operates only for newly generated php.ini files. Thus, you must also force regeneration of all php.ini files by running perl /var/www/imscp/setup/imscp-setup -da once you have edited the default open_basdir parameter through the frontEnd.


    BTW: It is not recommended to edit php.ini files manually because they will be overridden by i-MSCP at many levels.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hello,


    Backdraft007: Ich nutzt fcgi.


    Exactly that 'BTW: It is not recommended to edit php.ini files manually because they will be overridden by i-MSCP at many levels.' is the reason why I have used the open_basedir in the iMSCP-Adminpanel.
    But no worries. For me it's ok to do the change in the php.ini files my starting the process manually with the pearl command. And it's also alredy done now.
    I only want to confirm that this is also the normal way - as planned by the iMSCP developers.


    Thanks
    Regards

  • Hello,


    a new install IMSCP 1.2.17.
    I need to activate /usr/bin/ in open_basedir globaly, not per Domain. Where can i find is the Template?


    I can't find the settings on admin/settings.php


    THX for your Help


    Regards ShortSnow

  • @ShortSnow


    You must use the 10_php_confoptions_override.pl listener file.


    Replace the following part:


    Perl
    1. my %configOptions = ('*' => { # Any PHP configuration option added here will apply globally (to all domains).'<option_name1>' => '<option_value1>','<option_name2>' => '<option_value2>'},'<domain1.tld>' => { # Any PHP configuration added here will apply to domain1.tld only'<option_name1>' => '<option_value1>','<option_name2>' => '<option_value2>'},'<domain2.tld>' => { # Any PHP configuration added here will apply to domain2.tld only'<option_name1>' => '<option_value1>','<option_name2>' => '<option_value2>'});

    by

    Perl
    1. my %configOptions = (
    2. '*' => { # Any PHP configuration option added here will apply globally (to all domains).
    3. 'open_basedir' => '{HOME_DIR}/:{PEAR_DIR}/:/dev/random:/dev/urandom:/usr/bin/'
    4. }
    5. );


    Then, once done, execute perl /var/www/imscp/engine/setup/imscp-setup -danv

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hello Nuxwin,


    thx for support. The setup script wil stop with an error:


    Code
    1. [FATAL] Missing or bad entry found in configuration file.[ERROR] iMSCP::Dialog::_execute: Failed dialog:Please enter an username for the PhpMyAdmin SQL user:


    phpmyadmin.data:


    Code
    1. PHPMYADMIN_VERSION = 4.5.5.1
    2. PHPMYADMIN_CONF_DIR = tools/pma
    3. BLOWFISH_SECRET = xxx
    4. DATABASE_USER = pma_user
    5. DATABASE_PASSWORD = x



    It is a fresh Installation, Ubuntu 14.04.


    Thanks a lot.


    Regards ShortSnow

  • @ShortSnow


    That is not really an errors.


    Edit: OK.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206