We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Incorrect open_basedir Topic is solved
Incorrect open_basedir
When using basedir template, you won't be able to manage uploaded files, because open_basedir restriction is set only to the public_html.
Is this a bug?
Is this a bug?
Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/user/web/domain.com/public_html) in Unknown on line 0, referer: http://domain.lt/ordo/wp-admin/post.php ... ction=edit
PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
Re: Incorrect open_basedir
You can disble open_basedir (not good idea)sim wrote:When using basedir template, you won't be able to manage uploaded files, because open_basedir restriction is set only to the public_html.
Is this a bug?
Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/user/web/domain.com/public_html) in Unknown on line 0, referer: http://domain.lt/ordo/wp-admin/post.php ... ction=edit
PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
Code: Select all
<Directory /home/%user%/web/%domain%/public_html>
php_admin_value open_basedir none
</Directory>
Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
PS: Yeah, it's a bug. I read about it from this forum, but can't find where. Sorry.;)
Re: Incorrect open_basedir
Thanks your your answer, i fixed it myself, just can't believe they missed it.
Re: Incorrect open_basedir
Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
Re: Incorrect open_basedir
No, no, no - in directory
Let's show full template /usr/local/vesta/data/templates/web/apache2/basedir.stpl:
Let's show full template /usr/local/vesta/data/templates/web/apache2/basedir.stpl:
Code: Select all
<VirtualHost %ip%:%web_ssl_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %sdocroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Directory %sdocroot%>
AllowOverride All
SSLRequireSSL
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain%"
</Directory>
<Directory %home%/%user%/web/%domain%/stats>
AllowOverride All
</Directory>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile %ssl_crt%
SSLCertificateKeyFile %ssl_key%
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID %user% %group%
</IfModule>
Include %home%/%user%/conf/web/s%web_system%.%domain%.conf*
</VirtualHost>
Re: Incorrect open_basedir
Hi,
There is no such folder in my centos7.
Can you tell me the correct folder in centos7?
Thank you.
There is no such folder in my centos7.
Can you tell me the correct folder in centos7?
Thank you.
Re: Incorrect open_basedir
apache2 in centos has name httpdzaqueon wrote: There is no such folder in my centos7.
Can you tell me the correct folder in centos7?
/usr/local/vesta/data/templates/web/httpd/basedir.stpl
Re: Incorrect open_basedir
Hello,
I'm having the same problem on: http://refugio-pineta.es.
The 3 lines are already present in the 2 files so how do ?
Thanks in advance for your help !
I'm having the same problem on: http://refugio-pineta.es.
The 3 lines are already present in the 2 files so how do ?
Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
Re: Incorrect open_basedir
Just add /tmp to the open_basedir list:Daimko wrote:Hello,
I'm having the same problem on: http://refugio-pineta.es.
The 3 lines are already present in the 2 files so how do ?
Thanks in advance for your help !Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp
Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/tmp
Re: Incorrect open_basedir
The problem is still present :
An idea ?
Thank you in advance for your help.
Code: Select all
Warning: file_exists (): open_basedir restriction in effect. File (/ home / u941222742 / public_html / wp-content / uploads / 2017/04) (/home/admin/web/refugio-pineta.es/public_html:/home/admin/ Tmp) in /home/admin/web/refugio-pineta.es/public_html/wp-includes/functions.php on line 1611
Thank you in advance for your help.