Jump to content
  • 0

Basic Setup: Directories not writable


JaxSite

Question

Reluctant to post this but I've been trying to move past this for a while now. This is my 4th time to install Blesta. All other times have gone fairly smooth. This one was a migration to another server. I followed the guide and everything looks good. Site renders for both client and admin. Hostname didn't change and kept same db name / pw. Everything looks good except these directories won't show writable no matter what I do. Any thoughts or suggestions would be appreciated.

 

 

directory-list.png

settings.png

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Ok I've fixed my issue so I thought I would share in case anyone else runs into a similar issue. PHP's open_basedir was blocking those directories from being seen. I read that on several other blog posts but when I checked my php.ini file, that value wasn't even set. I'm running HestiaCP with Nginx + PHP-FPM. Apparently, there's an additional pool file created per domain located at /etc/php/7.x/fpm/pool.d/yourdomain.com.conf that was setting it. I simply updated it to include the directories and now they are writable as should be.
 

setup-fixed.png

Link to comment
Share on other sites

  • 0

app/controllers/admin_system_general.php

I've been debugging this issue on the server (yikes!). I don't really have a local setup for Blesta dev (yet). Just some basic echo statements to analyze the settings. Looks like the foreach() loop that checks if the directories are writable are returning false for the 2 directories mentioned above. Those paths are coming from the database settings. I've checked and the syntax / path is correct - those directories exist. So the is_writable() never gets called, since is_dir() returns false.

Any ideas why is_dir() is returning false on directories that are actually there? Thanks in advance.

code-snippet.png

 

settings.png

Link to comment
Share on other sites

  • 0

I've moved the directories up 2 levels. They have same user/group and permissions. I've even added some test code to write a file to the 3 directories. The tmp directory works and the other 2 fail. I am clueless as to why PHP is treating these other 2 folders differently. The user/group "jaxsite" on this server has id of 1003 where on the other server the id was 1004. Is there some code or settings in Blesta that tracks perms by id and perhaps they aren't matching on the server I migrated to?

dir-move-up.png

Link to comment
Share on other sites

  • 0
8 minutes ago, JaxSite said:

Ok I've fixed my issue so I thought I would share in case anyone else runs into a similar issue. PHP's open_basedir was blocking those directories from being seen. I read that on several other blog posts but when I checked my php.ini file, that value wasn't even set. I'm running HestiaCP with Nginx + PHP-FPM. Apparently, there's an additional pool file created per domain located at /etc/php/7.x/fpm/pool.d/yourdomain.com.conf that was setting it. I simply updated it to include the directories and now they are writable as should be.
 

setup-fixed.png

Thanks for the update, and sorry we didn't see your original post sooner.. though I doubt we would have guessed that it was open_basedir initially. We typically recommend disabling open_basedir completely, some other directories the system may access are /tmp (though you have /home/jaxsite/tmp/ set), and others like /dev/urandom which is called by phpseclib for certain encryption tasks.

Link to comment
Share on other sites

  • 0
8 hours ago, Paul said:

Thanks for the update, and sorry we didn't see your original post sooner.. though I doubt we would have guessed that it was open_basedir initially. We typically recommend disabling open_basedir completely, some other directories the system may access are /tmp (though you have /home/jaxsite/tmp/ set), and others like /dev/urandom which is called by phpseclib for certain encryption tasks.

Thanks for the feedback. I'll check on /dev/urandom and watch the logs over the next few days. Now that I'm past this issue, everything else seems to be working. It was a smooth migration overall. Next on my list is to upgrade to the latest version. ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...