Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Syslog-ng and ACL's
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jesterspet
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 215
Location: Atlanta

PostPosted: Tue Jul 09, 2013 4:50 pm    Post subject: Syslog-ng and ACL's Reply with quote

I would like to add read permissions for a user account (not root) to the /var/log/messages file using ACLs.
This would be trivial with setfacl if the log file did not rotate.

I am unable to locate a way to have syslog-ng create the file with the correct permissions.

Does anyone know how to get syslog-ng to create log files with ACL entries :?:
_________________
(X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Wed Jul 10, 2013 1:52 pm    Post subject: Reply with quote

Not offhand, but one way around this would be to have logrotate truncate the file instead of re-creating it.
_________________
True Liberals are individualists. Democrats, on the other hand, are authoritarian collectivists.
Back to top
View user's profile Send private message
jesterspet
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 215
Location: Atlanta

PostPosted: Tue Jul 16, 2013 4:57 pm    Post subject: Reply with quote

True, but that means no more log rotation for me :(

I'd like to be able to rotate my log files & be able to grant read permissions to individual users and groups to root owned files without affecting the normal operation of the system.

It would seem that the solution I am looking for is going to have to be a cron job that checks the acls and evaluates if they are present, and correct & if not apply them to the specified file. This is less than ideal, but I don't see another solution.
_________________
(X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Tue Jul 16, 2013 5:28 pm    Post subject: Reply with quote

jesterspet wrote:
True, but that means no more log rotation for me :(

I'd like to be able to rotate my log files & be able to grant read permissions to individual users and groups to root owned files without affecting the normal operation of the system.

It would seem that the solution I am looking for is going to have to be a cron job that checks the acls and evaluates if they are present, and correct & if not apply them to the specified file. This is less than ideal, but I don't see another solution.

You can still do that. Truncation just means that logrotate leaves the original file there and delete's its contents, instead of moving the file somewhere else and creating a new one. See the logrotate man page.

You may find better ways of dealing with it, though; that's just what came to mind.
_________________
True Liberals are individualists. Democrats, on the other hand, are authoritarian collectivists.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum