Question

WordPress security issue related to file manager plugin

Hi

I had installed two WordPress sites on same DigitalOcean server (Ubuntu + Nginx + Mariadb + php-fpm).

/var/www/html

/var/www/html2

Now problem is that file manager plugin installed on one WordPress site can read and edit files of another site.

Example: Plugin of WordPress at /var/www/html and edit files of /var/www/html2

Is there any way to restrict access of file manager plugin of one WordPress to installation_folder of that WordPress only?

Regards


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.

Accepted Answer

Hi there @rishi008tiwari,

One of the benefits of PHP FPM is that is can run PHP scripts with different users. What you could do is add different users for each website and create separate PHP FPM configs for each website.

For more details I would strongly recommend checking out this tutorial here on how to do this step by step:

https://www.digitalocean.com/community/tutorials/how-to-host-multiple-websites-securely-with-nginx-and-php-fpm-on-ubuntu-14-04

Hope that this helps! Regards, Bobby

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.