Hello All, I resized my droplet and some of my sites have stopped working. Find blow the error messages

April 27, 2017 378 views
PHP Linux Commands Nginx Ubuntu

2017/04/27 04:27:15 [error] 3720#0: *153 FastCGI sent in stderr: "Unable to open primary script: /xx/xx/xx/xx.json (No such file or directory)" while reading response header from upstream, client: xx.xx.xx.xx , server:, request: "POST /xx.json HTTP/1.1", upstream: "fastcgi://", host: "", referrer: ""

2017/04/27 04:27:14 [error] 3720#0: *153 open() "/xx/xx/xx/x.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server:, request: "GET /deps.js HTTP/1.1", host: "", referrer: ""

Please I need assistance.

1 Answer


This could be an issue with permissions, or potentially an issue with SCRIPT_FILENAME in your PHP FastCGI Params configuration.

I'd start by making sure that files and directories are owned by the user and group that is defined in your PHP-FPM pool.d file. If you've not setup a custom pool, that user would be www-data. If you have setup a custom pool, then you'd use that user and group.

For example, if you're home directory -- the directory where your files are located -- is:


You'd want run ls -al on that directory to see who owns it as well as the files within it. If it's not the same user defined in your pool file, you'll need to chown (change ownership).

We can do this recursively using chown -R. For example, to give www-data ownership, we'd run:

chown -R www-data:www-data /home/username/public_html

Now public_html and all files and directories within that directory are owned by www-data.


If it's not permissions related, we may need to look at other areas, such as fastcgi_params which is what you should be includeing in your PHP block.

Have another answer? Share your knowledge.