Operation not permitted) while reading upstream - error log is filled with tons of these
michael.friscia at yale.edu
Sat Jan 20 13:35:15 UTC 2018
Ok, found it. It was a permission issue. I did not have the uid and gid in the fstab, I set that the the www-data user that nginx is running as and the errors went away. I’m just not sure I understand how it made the cache files/directories in the first place. But clearly this is a problem when the cache is on a CIFS mount. I reverted to have the cache write to a local drive and there was no problem.
So I ended up on this page which led to the solution
Thank you for the suggestion, that’s actually where I started after you mentioned it to end up where I did.
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 544-3282 – mobile
On 1/20/18, 8:26 AM, "nginx on behalf of Aziz Rozyev" <nginx-bounces at nginx.org on behalf of arozyev at nginx.com> wrote:
As usual, try disabling selinux if it’s active. If that helps, investigate audit log..
> On 20 Jan 2018, at 15:47, Friscia, Michael <michael.friscia at yale.edu> wrote:
> I’m stumped and have exhausted pretty much every google search I could come up with on this. I have NGINX setup for caching. I’m using Ubuntu 17.10 and Nginx 1.12.1. Everything appears to be working just fine by the error log is getting filled with errors like this
> 2018/01/20 07:37:44 [crit] 122598#122598: *91 chmod() "/etc/nginx/cache/nginx2/main/a5/d8/e0/72677057b97aef4eee8e619c49e0d8a5.0000000013" failed (1: Operation not permitted) while reading upstream, client: 22.214.171.124, server: *.---.com, request: "GET /search/----.profile HTTP/1.1", upstream: "https://urldefense.proofpoint.com/v2/url?u=http-3A__-2D-2D-2D.-2D-2D-2D.-2D-2D-2D.-2D-2D-2D-3A80_search_-2D-2D-2D-2D.profile&d=DwIGaQ&c=cjytLXgP8ixuoHflwc-poQ&r=wvXEDjvtDPcv7AlldT5UvDx32KXBEM6um_lS023SJrs&m=M4doNhMd3t6V64zd-c0vWeBW7Z5jUH7dBvAM-8w3vDg&s=osyFFwk-WV5Vfm0y8mJYBaHvoETSeWkW5-r3PlhFAPw&e=", host: "---.com"
> From what I can tell, everything is working. Nginx must have permission, I deleted the cache folder and let it make on restart.
> The actual setup is that this is on Azure, the storage location /etc/nginx/cache/nginx2 is a mounted file share from Azure storage. I then created the folder /main/ inside that, this is the folder I deleted and on restart nginx created. Which makes me think that there is no permission problem but instead some other underlying problem that is throwing this false error. The cache gzip files are being made and the folder path for 2:2:2 is being created.
> Has anyone seen/solved this before?
> Michael Friscia
> Office of Communications
> Yale School of Medicine
> (203) 737-7932 - office
> (203) 544-3282 – mobile
> nginx mailing list
> nginx at nginx.org
nginx mailing list
nginx at nginx.org
More information about the nginx