Block Storage with Wordpress No Longer Web Writable in Ubuntu 20.04?

I have previously set up my wordpress installation successfully, with a mount at /mnt/MNTNAME and a symlink in my wordpress web directory …/public_html/wp-content/uploads. This was in Ubuntu 18.04. All was well, able to upload media in wordpress without issue.

I am working on an upgrade to the server, and migrated the install, and wasn’t able to figure out why on the new server, everything works except media uploads in wordpress.

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

After many hours of investigation, I think I’ve finally narrowed it down. Since the /mnt/ folder is outside of the web-writeable …/public_ html, the error comes up. As soon as I move the mnt into /public_ html, it works. This was not the case before. Any suggestions on how I can keep the previous setup and still get uploads to work with /mnt/ outside of the web writeable directory?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
July 7, 2021
Accepted Answer


It sounds like that you might have SELinux enabled. To check if this is the case run the following command:


If SELinux is enabled, you could allow the Apache service to write to that specific directory with the following command:

chcon -R -t httpd_sys_rw_content_t /mnt/path

Alternatively, you could manually mount the disk to your uploads directory directly, as per the instructions here:

Regards, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel