opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
832 stars 617 forks source link

Nginx Plugin Logging Issues When /var/log is Mounted as RAM Disk #4186

Open OoSTARTERoO opened 3 weeks ago

OoSTARTERoO commented 3 weeks ago

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

This is continuation of issue#4162 I have identified the root cause of the problem in more detail

Describe the bug After a reboot, Nginx should create a log folder "/var/log/nginx" with permission of 755 Instead, The folder is created with a permission of 700 with a owner of "root:staff"

Since Nginx is running with user "www" It cannot write any files to the /var/log/nginx

To Reproduce System > Settings > Misc Enable /var/log RAM Disk Reboot.

Expected behavior /var/log folder should be created with permission of 755.

Environment

OPNsense 24.7.1 (amd64). Nginx plugin 1.34 with /var/log RAM Disk enabled.

kulikov-a commented 2 weeks ago

Hi can you try with opnsense-patch -c plugins -a kulikov-a 250e8e9 (https://github.com/kulikov-a/plugins/commit/250e8e9d92ffb1ab2b26a47cd253c374a43fb0a8) ? (need to "Apply" nginx config after that)

OoSTARTERoO commented 2 weeks ago

@kulikov-a Yes! I've just tried it, and it is working flawlessly! (I applied the patch, and pressed "apply" on nginx. After that I did a full reboot.)

Thanks a lot!

kulikov-a commented 2 weeks ago

great, thanks! i'll make a pr