Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership and Mode of Virtual Host Log files #320

Open
xolyu opened this issue Jun 12, 2022 · 0 comments
Open

Ownership and Mode of Virtual Host Log files #320

xolyu opened this issue Jun 12, 2022 · 0 comments

Comments

@xolyu
Copy link

xolyu commented Jun 12, 2022

I have created a virtual host and configured the logs as "Own Log File" with the path $VH_ROOT/logs/error.log of the vhost log and $VH_ROOT/logs/access.log of the access log.

OpenLiteSpeed is executed as lsws:lsws (user : group). The generated log files get the following owner and mode. Obviously the owner is set explicitly, because the group owner is also set to lsws, although the folder logs has the setgid bit set.

root@test-webserver:/vhosts/test1# touch logs/test-touched-by-root
root@test-webserver:/vhosts/test1# ls -al logs/
total 27
drwxr-s--- 2 lsws test1      5 Jun 12 17:39 ./
drwxr-x--- 5 root test1      6 Jun 11 23:49 ../
-rw-r--r-- 1 lsws lsws  177087 Jun 12 17:43 access.log
-rw-r--r-- 1 lsws lsws       0 Jun 11 01:24 error.log
-rw-r--r-- 1 root test1      0 Jun 12 17:39 test-touched-by-root

Is it possible to define a umask for the log files?

My wish of the owner and the mode for the log files is:

  • for the owner: the group owner should not be set explicitly, so that the group owner is automatically taken over by the setgid bit of the folder. By the owning user lsws OpenLiteSpeed still has full read and write permissions.
  • for the mode: So that not for others read rights exist, the umask should be able to be set.
-rw-r----- 1 lsws test1             access.log
-rw-r----- 1 lsws test1             error.log

Are there ways to configure this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant