Unable to create directory wp-content/uploads/. Is its parent directory writable by the server? Permission Issues

Nope,

Neither of those are in the wp-config file.

Sorry for the trouble. Could you clarify whether this occurs on a brand new empty site within DevKinsta?

All three sites were imported from Kinsta.
It doesn’t just seem to be occuring with images though. It also will not add plugins.

Thank you. Could you try creating a “New WordPress site” from within DevKinsta and testing the new blank site? As in, one that’s created from within DevKinsta and not imported. I’m curious if perhaps it’s a setting from those imported sites or a system issue.

It does seem to be working with the new site that was created from a clean install.

Thanks for testing that. Are you familiar with using Terminal? Could you try the following steps?

Run the following:

docker exec -it devkinsta_fpm bash

Then run this:

echo "IyEvYmluL2Jhc2gKZmlsZXM9KHdwLWFkbWluIHdwLWNvbnRlbnQgd3AtaW5jbHVkZXMpCmVjaG8gIlJlc2V0dGluZyBmaWxlIHBlcm1pc3Npb25zLCB0aGlzIG1heSB0YWtlIGEgbW9tZW50Li4uIgplY2hvICJSZXNldHRpbmcgb3duZXJzaGlwLi4uIjsKY2hvd24gd3d3LWRhdGE6d3d3LWRhdGEgLVIgL3d3dy9raW5zdGEvcHVibGljLyoKZm9yIGkgaW4gIiR7ZmlsZXNbQF19IgpkbwogIGVjaG8gIlJlY3Vyc2l2ZWx5IHNldHRpbmcgZGlyZWN0b3J5IHBlcm1pc3Npb25zIHRvIDc1NSBvbiAkaS4uLiI7CiAgZmluZCAvd3d3L2tpbnN0YS9wdWJsaWMgLXR5cGUgZCAtbmFtZSAkaSAtZXhlYyBjaG1vZCAtUiA3NTUge30gKwogIGVjaG8gIlJlY3Vyc2l2ZWx5IHNldHRpbmcgZmlsZSBwZXJtaXNzaW9ucyB0byA2NDQgb24gJGkuLi4iOwogIGZpbmQgL3d3dy9raW5zdGEvcHVibGljIC10eXBlIGYgLW5hbWUgJGkgLWV4ZWMgY2htb2QgLVIgNjQ0IHt9ICsKZG9uZQplY2hvICJQZXJtaXNzaW9ucyBoYXZlIGJlZW4gcmVzZXQuIjs=" | base64 -d | bash

To translate, this will reset permissions. Here’s whats going on above:

#!/bin/bash
files=(wp-admin wp-content wp-includes)
echo "Resetting file permissions, this may take a moment..."
echo "Resetting ownership...";
chown www-data:www-data -R /www/kinsta/public/*
for i in "${files[@]}"
do
  echo "Recursively setting directory permissions to 755 on $i...";
  find /www/kinsta/public -type d -name $i -exec chmod -R 755 {} +
  echo "Recursively setting file permissions to 644 on $i...";
  find /www/kinsta/public -type f -name $i -exec chmod -R 644 {} +
done
echo "Permissions have been reset.";

Let me know if that works for you!

Edit: Added file and directory settings here on September 1, 2021.

1 Like

Is there something I must or can do in terms folder permissions?

WPML is throwing this error:

firefox_PXEYksTV0h-x

WPML String Translation is attempting to write .mo files with translations to folder:
/www/kinsta/public/domainname/wp-content/languages

This folder appears to be not writable. This is blocking translation for strings from appearing on the site.

To resolve this, please contact your hosting company and request that they make that folder writable.

For more details, see WPML’s documentation on troubleshooting .mo files generation..

Is there any support here? I guess not.

Hi @andxdev . Welcome to DevKinsta. Apologies for the delay. We do provide support here :slight_smile:

Could you share with us a bit more on your configuration? Are you running Windows or Mac? Does the directory exist? Was this a site that was pulled or created new within DevKinsta?

Thank you @michael.

I have given up ion DevKinsta, possibly until it is more polished and receives speedy support that I need in my work.

Let us close this case.

I’m very sorry for the trouble here @andxdev . We’ll have an update soon on the next release.

I just installed devkinsta today, downloaded one of my live sites to test and got the same error. WPML can’t write to /wp-content/languages folder. The folder exists (in Windows), but I don’t know how to check write permissions (I’m new to docker).

Hi @fmon ! Welcome to DevKinsta. I’m happy to help! I have a post here that might help you with the permission issue. Let me know if that works for you.

I’ve found this command in another topic to change permissions, run it and solved the problem:

docker exec devkinsta_fpm chown -R www-data:www-data /www/kinsta/public/

2 Likes

That’s great @fmon !

I had similar issues as described above, after importing a site from Kinsta to the local DevKinsta environment, I wasn’t able to delete a plugin and not able to add a new one, etc.
This solution worked just fine for me!

1 Like

Hi !

I’m posting in this topic because I think it’s related but not sure.

I have created a new site within DevKinsta (my 1st one).
I have a new error (it worked fine up until now) when I try to upload a media

“The uploaded file could not be moved to wp-content/uploads/2021/08.”

Could you help me ?

Thks in advance.

Amelie

Welcome to DevKinsta @amelie ! It does appear related. Try the guide above to and let me know if that helps.

I have tried and I have a big problem : I can’t connect any more to wp-admin, I get 403 error …

Permissions have been reset. 644 is not enough ?

Hi @amelie Could you try running through the steps again? It sounds like something went wrong here.