Forum Moderators: bakedjake

Message Too Old, No Replies

glogg cannot access apache logs

Do I have to add something to groups?

         

dstiles

12:46 pm on Mar 31, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



New installation on Debian. I installed glogg and it works but it will only access (eg) apache logs if I run it with sudo. On logs NOT in /var/log it seems ok.

On an older (Mint) installation I seem to recall doing something to make a non-sudo glogg read apache, mail etc logs but I cannot recall what.

Any help, please?

lammert

1:32 pm on Mar 31, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



In Debian most logfiles--including the apache logs--are owned by group "adm". What you could do is to give the glogg executable set-group access to the group adm with the following commands executed with root priviledges.
chgrp adm /path/to/glogg
chmod 02755 /path/to/glogg
Whenever the executable starts, the effective group of the process will be set to the group adm, and because most log files have that group as owner, the process will be able to read them.

dstiles

1:43 pm on Mar 31, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Many thanks, lammert. Just what I needed! :)

dstiles

3:46 pm on Apr 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



And that worked fine for the /var/log/apache2/* files (eg other_vhosts and error) but for some reason it does not work for apache's sub-folders (ie my sites logs). All permissions are the same (root read/write, adm read and others read). If I click on a site's log glogg loads it but not in the same copy of glogg and it fails to pick up the config file in ~/home/.config/glogg.

Up to a point I can understand that but not why the primary glogg can't read the sites logs, even though everything appears to be correct. :(.

lammert

9:51 pm on Apr 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Maybe a sub-directory in between which has not enough permissions for group adm?

phranque

3:47 am on Apr 16, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



yes i would check ownership and permissions for everything.

dstiles

8:53 am on Apr 17, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The only difference I can detect is that all the not-loading logs are in subdirectories of the one from which they do load. Structure is:

/varlog/apache2/ (logs load ok)
-rw-r----- 1 root adm 20087829 Apr 17 09:33 error.log
-rw-r----- 1 root adm 1468373 Apr 17 09:33 other_vhosts_access.log

/varlog/apache2/ern (logs load not ok)
drwxr-xr-x 2 root adm 4096 Apr 11 00:00 ern
/var/log/apache2/ern:
-rw-r----- 1 root adm 92871 Apr 17 06:59 access.log

lammert

9:32 am on Apr 17, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What does ls -ld /var/log/apache2/ern tell you? Is /varlog/ a symlink to /var/log?

dstiles

10:59 am on Apr 17, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



drwxr-xr-x 2 root adm 4096 Apr 11 00:00 /var/log/apache2/ern

I've just noticed the absence of / between var and log in my previous posting. My error on free typing. There is no symlink.

Forgot to add: reason given by glogg from glogg's own file-open browser is "File not found". Which seems odd - you'd think it would know its own opening path. On the other hand, dragging it from thunar doesn't work either. Which is why I think it is some king of permission problem.

lammert

11:12 am on Apr 17, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is SELinux installed? This may sometimes give weird errors if applications and file paths do not match the setting in the security policy.

dstiles

3:04 pm on Apr 17, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Not as far as I can tell. getenforce is not installed and nothing else seems to be upset (although I can't get pkexec to work, but another problem, I think). And I'm having serious prolems with iptables, but again not related as far as I know. What command should I use to be sure?