• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved ngnix: var/lib/nginx/body/ (13: Permission denied)

nulltech

New Pleskian
Hello Plesk Community,
I currently have a problem with my right new Plesk installation: The nginx body temp isn't working.
I tried almost everything, but I can't get rid of the error.

Exmple notification in the logs: [crit] 8237#0: *69 open() "/var/lib/nginx/body/0000000002" failed (13: Permission denied) or [crit] 8237#0: *210 open() "/var/lib/nginx/proxy/3/00/0000000003" failed (13: Permission denied) while reading upstream

The Permissions in the diredtory seems to be correct:
ls.PNG

I hope someone here has an idea to solve the problem.

Greetings
Lukas Müller
 
Do you have the same permissions here:

# stat /var/lib/nginx
File: '/var/lib/nginx'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 4ad0b6f1h/1255192305d Inode: 1447203 Links: 7
Access: (0700/drwx------) Uid: ( 993/ nginx) Gid: ( 996/ nginx)

I see psaftp:nginx there.
 
Hello Plesk Community,
I currently have a problem with my right new Plesk installation: The nginx body temp isn't working.
I tried almost everything, but I can't get rid of the error.

Exmple notification in the logs: [crit] 8237#0: *69 open() "/var/lib/nginx/body/0000000002" failed (13: Permission denied) or [crit] 8237#0: *210 open() "/var/lib/nginx/proxy/3/00/0000000003" failed (13: Permission denied) while reading upstream

The Permissions in the diredtory seems to be correct:
View attachment 15039

I hope someone here has an idea to solve the problem.

Greetings
Lukas Müller

@Lukas Müller

The response made by @IgorG is very adequate and is very likely to contain the solution to your problem.

Let me explain, otherwise it would not be clear immediately.

The Nginx error notification simply states that there is a file/directory permissions issue: with Nginx, this error notification often occurs when cached assets (on the proxy level) cannot be served properly (and it has been known that particular PHP or PHP-FPM related issues can cause a similar error notification as a result of errors on the proxy level, but that is not the root cause of your problem).

@IgorG pointed out that you have something like psaftp:nginx on the . level of the permissions structure: see the first line in your picture, after running ls -al.

In a default Nginx setup, that should be nginx:nginx (instead of psaftp:nginx).

I am pretty sure that your problem will be solved by setting the proper file/directory ownership and permissions structure (run chmod and chown).

Just let me know if that helps and/or if you have some additional questions.

Regards.......
 
@Lukas Müller

The response made by @IgorG is very adequate and is very likely to contain the solution to your problem.

Let me explain, otherwise it would not be clear immediately.

The Nginx error notification simply states that there is a file/directory permissions issue: with Nginx, this error notification often occurs when cached assets (on the proxy level) cannot be served properly (and it has been known that particular PHP or PHP-FPM related issues can cause a similar error notification as a result of errors on the proxy level, but that is not the root cause of your problem).

@IgorG pointed out that you have something like psaftp:nginx on the . level of the permissions structure: see the first line in your picture, after running ls -al.

In a default Nginx setup, that should be nginx:nginx (instead of psaftp:nginx).

I am pretty sure that your problem will be solved by setting the proper file/directory ownership and permissions structure (run chmod and chown).

Just let me know if that helps and/or if you have some additional questions.

Regards.......

Hello,
thanks for you answere.
After setting the permissions correct, the error has been fixed.
I'm not really sure why the permissions wasn't in default state.

Greetings
Lukas Müller
 
@Lukas Müller

You stated

I'm not really sure why the permissions wasn't in default state.

and I might add that I am also not really sure: after all, the Plesk installer(s) do not install Nginx with the wrong permissions.

In short, I might be very curious with respect to the root cause of the problem, but that is barely relevant right now: problem resolved (and that is the objective, isn't it?)

Regards.............

PS If you have some spare time in the near future, I would recommend that you check the ownership and permissions structure on other files and directories. Anything spotted can prevent a number of serious problems in the near future.
 
Back
Top