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

Q: Date/Time this occurred (Provide your time zone also)
A: Monday, February 8th, 2021 @ 7:46PM MST

Q: DevKinsta Version
A: Latest as of today

Q: OS Version
A: Windows 10

Q: Docker Desktop Version
A: v20.10.2

Q: Were any error codes or messages observed? If so, what were they?
A: Unable to create directory wp-content/uploads/2021/02. Is its parent directory writable by the server?

Q: Detailed Description of the Problem
A: Unable to upload image to DevKinsta post featured image or media library.

Hi @aidenberzins . Welcome! Thanks for reporting the issue. It should work by default :thinking: . Is this for a brand new site or an imported site? Do you have any other sites you’d be able to test this on? Lastly, do you have any apps or antivirus software that could be blocking it?

The site was originally imported from GoDaddy but I had someone restart the staging site so that I could develop fresh and pull into DevKinsta without issue.

I can try on one of my other sites as well to see if this is an isolated issue. It is only a problem because it rewrites the database with null values so if I could just push the site without the database that would also be fine.

No antivirus software.

@michael It is the same issue across my sites in DevKinsta.

Even if the folder already exists.

I did manage to figure it out.

I needed to restart the Docker DB container: “devkinsta_db” from Docker Desktop.
And then it had no issues.

1 Like

That’s fantastic! I’m glad it was an easy fix. Thanks for updating us here!

This does seem to be a recurring issue and resetting the DB container did not work this time.
Not sure how to troubleshoot this.

Hi Aiden,

Can you confirm that your wp-config file does not have any of the following set?



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:

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[@]}"
  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 {} +
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:


WPML String Translation is attempting to write .mo files with translations to folder:

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).