You are not logged in.

#1 2006-04-12 08:35:58

Clanman
Member
Registered: 2005-02-08
Posts: 35

Allowing special user to read log files [Solved]

Hi
I want to add a group (log) that has the privledges to read /var/log files
and then add my user to that group.
How do i accomplish this

This is to run root-tail in .xinitrc

Or is there an other way?


//Clanman

Offline

#2 2006-04-12 09:16:05

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Allowing special user to read log files [Solved]

Are you sure you don't have a log group already? I've had it for quite a while now, and it was created automatically.

Actually, after a little digging I found the message "added a log group" in CVS for the filesystem package upgrade 7 months ago.

However, If you definitely don't have it, for some reason, try reinstalling filesystem and syslog-ng, and then use gpasswd to add your user to the log group.

Offline

#3 2006-04-12 13:22:26

Clanman
Member
Registered: 2005-02-08
Posts: 35

Re: Allowing special user to read log files [Solved]

Thanks for the info

After trying
pacman -Sy
pacman -S filesystem
pacman -S syslog-ng

i still get this

groups
root bin daemon sys adm disk wheel

No log group

Please advice

//Clanman

Offline

#4 2006-04-12 13:25:42

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Re: Allowing special user to read log files [Solved]

Check if you have it :
# cat /etc/group | grep log

If you have it :
# usermod -a -G log <your user>


Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

#5 2006-04-12 13:33:22

Clanman
Member
Registered: 2005-02-08
Posts: 35

Re: Allowing special user to read log files [Solved]

Trying
cat /etc/group | grep log
returns
log:x:19:myusername   

usermod -a -G log myusername
returns nothing

ofcource myusername is something else

when trying

root-tail -g 800x250+10+10 -justify -fn '-*-verdana-*-*-*-*-10-*-*-*-*-*-*-*' /var/log/errors.log,orange,'ALERT'

i get 
Permission denied

//Clanman

Offline

#6 2006-04-12 13:37:54

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Re: Allowing special user to read log files [Solved]

Is this file owned by root:log with permissions 640 ?


Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

#7 2006-04-12 13:49:31

Clanman
Member
Registered: 2005-02-08
Posts: 35

Re: Allowing special user to read log files [Solved]

[root@master fredrik]# ls -al /usr/bin/root-tail
-rwxr-xr-x  1 root root 22600 2006-01-08 04:58 /usr/bin/root-tail
[root@master fredrik]# chmod 640 /usr/bin/root-tail
[root@master fredrik]# ls -al /usr/bin/root-tail
-rw-r-----  1 root root 22600 2006-01-08 04:58 /usr/bin/root-tail
[root@master fredrik]# chgrp log /usr/bin/root-tail
[root@master fredrik]# ls -al /usr/bin/root-tail
-rw-r-----  1 root log 22600 2006-01-08 04:58 /usr/bin/root-tail

exiting root

fredrik@master ~]$ root-tail -g 800x250+10+10 -justify -fn '-*-verdana-*-*-*-*-10-*-*-*-*-*-*-*' /var/log/errors.log,orange,'ALERT'
-bash: /usr/bin/root-tail: Permission denied

Still no go

//Clanman

Offline

#8 2006-04-12 13:54:13

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Re: Allowing special user to read log files [Solved]

Not root-tail but /var/log/errors.log ! Please restore root-tail permissions to 755.


Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

#9 2006-04-12 14:04:42

Clanman
Member
Registered: 2005-02-08
Posts: 35

Re: Allowing special user to read log files [Solved]

Sorry missunderstood
I have chmod it back to 755

ls-al /var/log/
-rw-r-----   1 root log      3432 2006-04-12 09:45 errors.log


//Clanman

Offline

#10 2006-04-12 14:14:19

Clanman
Member
Registered: 2005-02-08
Posts: 35

Re: Allowing special user to read log files [Solved]

I dont think I that
usermod -a -G log fredrik

made a diff.

cause

groups fredrik still returns

audio optical video log camera users

Edit
Now all of a sudden
usermod -a -G log fredrik  worked
cause
groups fredrik
returns
audio optical video log camera users

But same problem when running
fredrik@master ~]$ root-tail -g 800x250+10+10 -justify -fn '-*-verdana-*-*-*-*-10-*-*-*-*-*-*-*' /var/log/errors.log,orange,'ALERT'
/var/log/errors.log: Permission denied


//Clanman

Offline

#11 2006-04-12 15:34:25

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Allowing special user to read log files [Solved]

After adding yourself to a group, you need to log out and log back in again for the new group membership to take effect.

Offline

#12 2006-04-22 08:08:09

Clanman
Member
Registered: 2005-02-08
Posts: 35

Re: Allowing special user to read log files [Solved]

After logging out and in again it worked

Thanks all for the help

//Clanman

Offline

Board footer

Powered by FluxBB