• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

open basedir restriction

D

davividal

Guest
Hi all.

I followed
http://kb.swsoft.com/article_41_432_en.html

But this errors remains:
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media/com_MOStlyCE_AdminV454.2.zip) is not within the allowed path(s): (/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/www/vhosts/paiemae.com.br/httpdocs/portal/media) in /home/www/vhosts/paiemae.com.br/httpdocs/portal/administrator/components/com_installer/admin.installer.php on line 174

Can anyone help me?
By the message, I didn't missed nothing, but I can wrong.

Thank you very much!
 
Yes. As describe on the above link.

And with:
/usr/local/psa/admin/websrvmngr --reconfigure-vhost --vhost-name=DOMAIN

and

/usr/local/psa/admin/websrvmngr -r

and

/etc/init.d/$APACHE_BIN restart

(I don't remember now what's apache bin name...)
 
Hi,


Add this to the open_basedir :

/home/httpd/vhosts/paiemae.com.br/httpdocs

instead of :

/home/www/vhosts/paiemae.com.br/httpdocs/portal/media

This last one is already included under the /home/www/vhosts/paiemae.com.br/httpdocs
 
My actual vhosts.conf:

/home/www/vhosts/paiemae.com.br/conf # vi vhost.conf

<Directory /home/www/vhosts/paiemae.com.br/httpdocs/>
php_admin_flag register_globals on
php_admin_value open_basedir "/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/www/vhosts/paiemae.com.br/httpdocs/portal/media"
php_admin_value sendmail_path "/var/qmail/bin/sendmail -t -i [email protected]"
php_admin_value sendmail_from "[email protected]"
</Directory>

I'm using Plesk 8.1, SuSE 9.3, Apache 2.0 and MySQL 4.1.

I really don't known what to do!
:(

Thank you
 
Hello,

It should be like this:

<Directory /home/www/vhosts/paiemae.com.br/httpdocs>
php_admin_flag register_globals on
php_admin_value open_basedir "/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs"
php_admin_value sendmail_path "/var/qmail/bin/sendmail -t -i [email protected]"
php_admin_value sendmail_from "[email protected]"
</Directory>

Please look at the error carefully.

It searches in /home/httpd/vhosts... and you added /home/www/vhosts/...
 
vhosts.conf
<Directory /home/www/vhosts/paiemae.com.br/httpdocs/>
php_admin_flag register_globals on
php_admin_value open_basedir "/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs"
php_admin_value sendmail_path "/var/qmail/bin/sendmail -t -i [email protected]"
php_admin_value sendmail_from "[email protected]"

</Directory>

Error:
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media/com_MOStlyCE_AdminV454.2.zip) is not within the allowed path(s): (/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs) in /home/www/vhosts/paiemae.com.br/httpdocs/portal/administrator/components/com_installer/admin.installer.php on line 174

vhosts.conf
<Directory /home/www/vhosts/paiemae.com.br/httpdocs/>
php_admin_flag register_globals on
php_admin_value open_basedir "/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media"
php_admin_value sendmail_path "/var/qmail/bin/sendmail -t -i [email protected]"
php_admin_value sendmail_from "[email protected]"

</Directory>

Error:
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media/com_MOStlyCE_AdminV454.2.zip) is not within the allowed path(s): (/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media) in /home/www/vhosts/paiemae.com.br/httpdocs/portal/administrator/components/com_installer/admin.installer.php on line 174


After each alteration on vhosts.conf, I run:

Code:
# /usr/local/psa/admin/sbin/websrvmng -v -a

My 'media' folder has chmod 777.

Thank you.
 
Originally posted by blank_page
Hello,

Running /usr/local/pas/admin/sbin/websrvmng -av is not enough.

You also have to restart apache.

# /etc/init.d/apache2 restart

and...

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media/com_MOStlyCE_AdminV454.2.zip) is not within the allowed path(s): (/home/www/vhosts/paiemae.com.br:/tmp:/home/www/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs:/home/httpd/vhosts/paiemae.com.br/httpdocs/portal/media) in /home/www/vhosts/paiemae.com.br/httpdocs/portal/administrator/components/com_installer/admin.installer.php on line 174

:(

Other sugestion?? :(
 
You are trying to access file located in /home/httpd/vhosts/paiemae.com.br/httpdocs/ from /home/www/vhosts/paiemae.com.br/httpdocs/ so it might be actually hard to allow, due to configuration limitations.

You might want to try disabling open_basedir entirely, unless you are worried about basedir security.

<Directory /home/www/vhosts/paiemae.com.br/httpdocs/> php_admin_flag register_globals on
php_admin_value open_basedir none
php_admin_value sendmail_from "[email protected]" </Directory>

Then run websrvmng -a -v and restart Apache.
 
I'll try this, but /home/httpd isn't a link to /home/www ??

Thank you.
 
Originally posted by SWsoft support
Normally it is not - unless you are using symlinked setup.

If you are using it as symlink - then it is possible to cause issues.

Yes. I'm using symlink:

# cd /home/
# ls -la
total 48972
drwxr-xr-x 12 root root 4096 Dec 3 10:07 .
drwxr-xr-x 27 root root 4096 Nov 6 00:48 ..
(...)
lrwxrwxrwx 1 root root 3 Apr 22 2006 httpd -> www
(...)
drwxr-xr-x 3 root root 4096 Sep 8 2005 www

How should I procced?

Thank you very much!
 
Back
Top