3

Getting an error in the nginx logs:

[error] 6193#6193: *1 open() "/home/ubuntu/app/assets/bootstrap.min-2e2a039f4eb020ba4438b6e2ad6a83748c14257a60f68facd2d72df75c452969.css" failed (13: Permission denied), 
client: 127.0.0.1, server: 127.0.0.1, request: "GET /assets/bootstrap.min-2e2a039f4eb020ba4438b6e2ad6a83748c14257a60f68facd2d72df75c452969.css HTTP/1.1", host: "127.0.0.1", referrer: "http://127.0.0.1/"

First, this looks like a temp file with the random appendage, but a file with this exact name does not exist in the directory.

Second, bootstrap.min which is in app/assets/stylesheets has the following permissions:

-rwxr-xr-x 1 www-data www-data bootstrap.min.css

My nginx config has the following for assets:

location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
}

It was my understanding this will pick up on the first assets folder it finds and load all sub-directories.

  • You need to check the permissions on the containing directories. Of course, you also need to figure out why your app did not create that static file. – Michael Hampton Nov 27 '18 at 8:48
  • Not entirely sure where to start with that. Guessing it is a privilege issue, the directory is owned by www-data just the like the file above. – user58446 Nov 30 '18 at 23:57
  • Um, check the permissions of all the parent directories. – Michael Hampton Dec 1 '18 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.