Joined February 2014
·

Ronny Falk

Montreal
·
·

Posted to Nginx direct file upload over 1 year ago

@mikhailov
thanks, I synchronized the nginx user and the backend user to be the same - works alright.

Posted to Nginx direct file upload over 1 year ago

files created by nginx:
2014/02/26 21:47:23 [notice] 4533#0: *1 a client request body is buffered to a temporary file /var/www/staging/0000000001, client: 127.0.0.1, server:.com, request: "POST /upload HTTP/1.1", host: "localhost"

created file has owner nobody and very restrictive permissions
-rw------- 1 nobody admin 140257 26 Feb 21:47 0000000001

I'd like to read the file and process it's contents in the backend but I can't seem to figure out how to tell nginx to use a different umask (022) for the files it creates. Can anybody help me please?

The exception I get in the backend:
java.nio.file.AccessDeniedException: /tmp/0055119830
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)

Achievements
1 Karma
0 Total ProTip Views