-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
no need to implement log rotation internally #7
Comments
You made a good point! Basically, I didn't test installations with root privileges and running with user privileges. And also, I realized that It should be considered because binary distribution like debian packaging is goes on in different privileges. Yes, our logger thread cannot be properly working in this setup as you described. So I have no objection to use I'll start this work from this week to solve this problem for accelerating debian package project in r0.2 branch. Of course, I'll try to solve Issue #4 at the same time. |
I've updated r0.2 for supporting There are two things that is different from other open sources. Mostly, the followings are for developer. Let me know if it could be a problem to the end-user.
I used
So, if user installs this package with
I know most open source project generally uses specific user. In our case, it will be a 'nextepc:nextepc'. Yeah!... It could be changed with ./configure --enable_user=acetcom --enable-group=acetcom. However, in my case, I'd just like to use ./configure --prefix=`pwd`/install without any other options. I'm not sure what is good for us. Just it's my first trial. |
Please, forget about the previous message. I think that above two things are not good for us. In debian package, I made a BTW, I've initially uploaded debian package using
Thank you for your contribution related to debian package. |
Tests running locally
It seems like nextepc is implementing log rotation internally, at least judging from the below log messages:
This means that nextepc would have to run with permissions not only to the single log file it is writing to, but also with permissions to write/create new files in /var/log, which normally only root can do.
I would suggest to leave log file rotation up to logrotate, and simply re-open the log files on SIGHUP. This meachanism has worked for decades and is well-understood by sysadmins all over the planet.
https://linux.die.net/man/8/logrotate
https://wiki.archlinux.org/index.php/logrotate
This way, only logrotate needs to run with higher privileges, while the individual daemon (like nextepc) can run with regular user privilege, only with a single /var/log/nextepc.log writable to the nextepc user.
The text was updated successfully, but these errors were encountered: