Could not create or write to following directories

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
mtitone
Posts: 3
Joined: Mon Jul 18, 2016 9:11 pm

Could not create or write to following directories

Post by mtitone » Mon Jul 18, 2016 9:39 pm

Hello,

I know this is a popular question. I am getting the following error when I browse to http://[my server]/faq/phpmyfaq:
The following directories could not be created or are not writable:

- /attachments
- /data
- /images

Please create them manually and/or change access to chmod 775 (or greater if necessary).
I'm using Ubuntu server 16.04, phpmyfaq 2.9.2, LAMP with PHP 7.0 and apache 2.4.

I transferred my phpmyfaq directory into /var/www/faq. I created new directories as such:

Code: Select all

sudo mkdir ./attachments
sudo mkdir ./data
sudo mkdir ./images
sudo mkdir ./config
I changed the permissions and ownership:

Code: Select all

sudo chown -R www-data:www-data /var/www/faq
sudo chmod -R 777 /var/www/faq


Using ls -l I've confirmed that everything under and including faq has 777 permissions and is owned by www-data.

I also changed the ownership of www:

Code: Select all

sudo chown -R www-data:www-data /var/www
I do not have SE linux installed.

I've restarted apache2.

I've tried deleting everything under faq and put phpmyfaq back in there, repeating the above steps.

Is there anything else I could try that might work? Let me know if you need more information.

Thank you,

Thorsten
Posts: 14450
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Could not create or write to following directories

Post by Thorsten » Tue Jul 19, 2016 9:08 am

Hi,

even with your steps above the setup script told you that it's not writable?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

mtitone
Posts: 3
Joined: Mon Jul 18, 2016 9:11 pm

Re: Could not create or write to following directories

Post by mtitone » Wed Jul 20, 2016 8:55 pm

Yes,

I delete everything under faq, transfer unzipped phpmyfaq folder to my server using winscp, move it to faq, make the attachments, data, config, and images folders, chmod -R 777 faq, chown -R www-data:www-data faq, I enter sudo service apache2 restart, and then browse to my server's installation at http://[server ip]/faq/phpmyfaq/setup/index.php.

When I do this, I always get the message stating that attachments, data, and images aren't writable.

This happens with the latest 2.8 as well.

I get a little bit farther when I try to install the latest phpmyfaq 2.9 using git, but I'm not a php developer and most of the errors I get caught up on are a little over my head. Still, I'm at a dead end with the other methods.

mtitone
Posts: 3
Joined: Mon Jul 18, 2016 9:11 pm

Re: Could not create or write to following directories

Post by mtitone » Wed Jul 20, 2016 11:52 pm

I figured it out.

My directory structure is set up like:

/var/www/faq/phpmyfaq/...

where phpmyfaq is the folder extracted from the .zip

I was putting the attachments, images, data, config folders under faq, at the same level as phpmyfaq.

When I put them under phpmyfaq though, it all worked.

Thorsten
Posts: 14450
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Could not create or write to following directories

Post by Thorsten » Thu Jul 21, 2016 6:57 am

Hi,

ah... thanks for the feedback. I think I have to improve the error messages.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest