Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
bobmeetin
Posts: 16
Joined: Tue Apr 10, 2018 3:52 pm

Os: CentOS 6x
Web: apache + nginx
installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.
  • Quote

Post by bobmeetin » Mon May 28, 2018 5:31 pm

Installing ckfinder is easy. All you do is set a path for the install. However it is failing to start and the full error is like the following:

Warning: is_writable(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/my_account/web/my-domain.com/public_html:/home/my_account/tmp) in /home/my_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/Config.php on line 330

Fatal error: Uncaught exception 'CKSource\CKFinder\Exception\InvalidConfigException' with message 'The temporary folder is not writable for CKFinder' in /home/my_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/Config.php:331 Stack trace: #0 /home/my_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/Config.php(73): CKSource\CKFinder\Config->validate() #1 /home/my_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/CKFinder.php(92): CKSource\CKFinder\Config->__construct('/home/my_account...') #2 /home/my_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/pimple/pimple/src/Pimple/Container.php(113): CKSource\CKFinder\CKFinder->CKSource\CKFinder\{closure}(Object(CKSource\CKFinder\CKFinder)) #3 /home/my_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/CKFinder.php(187): Pi in /home/my_accounmy_account/web/my-domain.com/public_html/ckfinder/core/connector/php/vendor/cksource/ckfinder/src/CKSource/CKFinder/Config.php on line 331

I looked at the php.ini via Vesta CP. The open_basedir setting is:

;open_basedir =

To resolve the above error what would be the right syntax for open_basedir? Or - can this be fixed by modifying the .htaccess? How?
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.
  • Quote

Post by grayfolk » Mon May 28, 2018 5:49 pm

In Vesta apache templates open_basedir defined for each domain - see ~/conf/web folder.
You can change template - add /tmp to open_basedir or change CKEditor config for use another temporary folder.
Top

bobmeetin
Posts: 16
Joined: Tue Apr 10, 2018 3:52 pm

Os: CentOS 6x
Web: apache + nginx
Re: installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.
  • Quote

Post by bobmeetin » Mon May 28, 2018 9:56 pm

Please walk me through this. I opened VestaCP as root, signed into the account in question, $my_account, then as that user click on the WEB tab. There I select to edit '$my-domain.com'.

Web template is set to default. There is a basedir option from the dropdown. If I switch to basedir and save I see no additional options to add /tmp to open_basedir.
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.
  • Quote

Post by grayfolk » Mon May 28, 2018 10:10 pm

bobmeetin wrote: ↑
Mon May 28, 2018 9:56 pm
Web template is set to default. There is a basedir option from the dropdown. If I switch to basedir and save I see no additional options to add /tmp to open_basedir.
I mean you can edit default Vesta templates manually. You can find it in /usr/local/vesta/data/templates/web/httpd/ - if you use Apache.
Top

bobmeetin
Posts: 16
Joined: Tue Apr 10, 2018 3:52 pm

Os: CentOS 6x
Web: apache + nginx
Re: installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.
  • Quote

Post by bobmeetin » Mon May 28, 2018 11:06 pm

Ah - okay I found the file. The line is set to:

php_admin_value open_basedir %docroot%:%home%/%user%/tmp

What does it need to be changed to, perhaps?

php_admin_value open_basedir %home%/%user%/tmp

Will this affect the operation of Vesta CP, for instance if it got messed up?
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: installed ckfinder, but get an error: Warning: is_writable(): open_basedir restriction in effect.
  • Quote

Post by grayfolk » Tue May 29, 2018 12:18 am

Use : as paths separator:

Code: Select all

php_admin_value open_basedir %docroot%:%home%/%user%:/tmp
Save file then go to the Vesta users, select affected user(s) and make Rebuild Web. Then restart apache.
Also you can comment this line for disable open_basedir.
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password