#891417 systraq: error message during package installation 'ls: cannot access '/home/*/.ssh/a*': ...'

#891417#5
Date:
2018-02-25 12:06:42 UTC
From:
To:
Dear Maintainer,

during package installation the line

ls: cannot access '/home/*/.ssh/a*': No such file or directory

gets printed after package installation and my systems etckeeper
run. My examination showed it initially from
/etc/systraq/Makefile, after installing the version from buster
the line comes from /usr/include/systraq/filetraq.mk

I'm guessing the debian-systraq user isn't allowed to peek into my
users home dirs due to filesystem permissions, but even if I
change the one or two users directories now, future users adding
the authorized_keys file in the future might get missed.

Peter

#891417#10
Date:
2021-01-03 12:47:46 UTC
From:
To:
Hi Peter,

Thank you for your interest in systraq and reporting the issue.  It's indeed
an annoying message.

filetraq.main.conf:
	echo '# $@: automatically generated' > $@
	find /etc -not -readable -and -prune -or \( -perm -a+r -and -type f -and -print \) | sort >> $@
	ls -1 /home/*/.ssh/a* | sort >> $@

which is executed as user debian-systraq, e.g. during package upgrade via
/etc/apt/apt.conf.d/20systraq .

I'd like this code to give an error message if permissions are lacking, but
ideally _not_ when no files /home/*/.ssh/a* are present on the system.  I
haven't managed to produce not too complicated code which does just that.
I'll spend some more brain cycles on it.

Anyway, as is commonly said: patches are welcome...

Bye,

Joost

#891417#15
Date:
2023-01-06 12:42:45 UTC
From:
To:
Hi again,

 find /home -maxdepth 3 -not -readable -and -prune -or \( -name "authorized_keys*" -and -path "*/.ssh*" \)

.

I want both ~/.ssh/ and ~/.ssh2/ .  I want both authorized_keys and authorized_keys2 .

TL:DR; WiP...

Bye,

Joost