plugins icon indicating copy to clipboard operation
plugins copied to clipboard

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

Open SuperThicc opened this issue 1 year ago • 3 comments

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

  • [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
  • [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • [x] The title contains the plugin to which this issue belongs

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.

SuperThicc avatar Aug 19 '24 05:08 SuperThicc

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)

kulikov-a avatar Aug 25 '24 05:08 kulikov-a

@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!

SuperThicc avatar Aug 25 '24 06:08 SuperThicc

great, thanks! i'll make a pr

kulikov-a avatar Aug 25 '24 06:08 kulikov-a

Has this still not been merged? This issue persists after months, and that pull request should fix it

SuperThicc avatar Dec 15 '24 02:12 SuperThicc