Report this

What is the reason for this report?

iThemes security says "The file path supplied in NGINX Conf File is not writable." Do i need to make this file writable? if yes, by who?

Posted on February 17, 2017

“The file path supplied in NGINX Conf File is not writable. Please supply a file path that can be written to.” - Basically iThemes is trying to modify the nginx.conf file for certain settings and is unable to do so? Do I need to create a symlink etc. to make sure everything is working fine with iThemes.?



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!

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.

You’ll need to change the owner to either www-data or nginx on newer versions of nginx, you can see which by looking at the user specified in /etc/nginx/nginx.conf.

To change the owner of a file or directory you use chown like so:

chown -R www-data /var/www

Breaking this down, the -R option makes chown act recursively, changing the owner of any subdirectories or files, replace www-data with the user you want to be the owner of specified files/directories and /var/www is said file/directory.

@jaimamtani

Since you’re using NGINX and PHP-FPM, your files and directories should be owned by the user that is running the PHP-FPM process, not the NGINX user. When you’re using PHP-FPM, NGINX is not handling reading/writing to your files, PHP-FPM is. Even if NGINX were, you don’t want the web server to handle your files for you, PHP-FPM should be.

You can change in to your PHP-FPM directory and check the file in ./pool.d to see who the process is running as.

i.e.

cd /etc/php/*/fpm/pool.d
ls -al

You should see either www.conf or default.conf. Use nano to open that file.

nano www.conf

In this file, look for:

user  =
group =

and

listen.owner =
listen.group =

On a default setup, all four of those should be set to the same user which is normally www-data. In such a case, your files and directories should be owned by www-data.

If you’re web root is /var/www then simply run:

chown -R www-data:www-data /var/www

and then try writing again.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.