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

log permissions incorrect with RunAsUser mode -- prevents log rotation #686

Closed
michaelrsweet opened this issue Apr 19, 2004 · 2 comments
Closed
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1.20
CUPS.org User: jtlayton.poochiereds

CUPS creates logfiles with the ownership as root, even if the RunAsUser option is set:

% ls -l /var/log/cups
-rw-r--r-- 1 root cupsadm 1225 Jan 29 20:07 access_log
-rw-r--r-- 1 root cupsadm 16886096 Jan 29 20:04 access_log.O
-rw-r--r-- 1 root cupsadm 10485790 Apr 15 10:23 error_log
-rw-r--r-- 1 lp cupsadm 3567925 Jan 27 20:10 error_log.O
-rw-r--r-- 1 lp cupsadm 9761067 Apr 19 08:06 page_log

This is bad, as when you hit the MaxLogSize, CUPS is then unable to rotate the log due to insufficient permissions. This happened to me the other day. Logging stopped on my CUPS server on April 15th, because CUPS was unable to rotate the logs.

The easy fix is to probably chown the logfiles to the RunAsUser prior to the setuid() system call.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Thanks, will look into fixing this for 1.1.21.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

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

No branches or pull requests

1 participant