Here's an interesting little quirk in the RaspiOS setup. If you have a long-running process (or just a shell) that uses ssh Agent for authentication, then you will have the variable SSH_AUTH_SOCK containing the name of a file, which is stored in /tmp. it works fine until (after about 60 days), the tmp file cleaner process removes your sock from /tmp. Then you find that you can no longer ssh into remote hosts.
There are, of course, lots of workarounds one could imagine for this. Ideally, systemd-tmpfiles should be reconfigured to leave these files alone. Another approach might be to change whatever process creates the sock files to not put them in /tmp. Both of these fixes would be beyond my capabilities, however.
Any other good ideas would be welcomed.
BTW, the simple solution is for the user (that's me) to setup a cronjob to periodically "touch" the file or directory on /tmp, to keep the cleaner from messing with it. This is about the only solution if you do not have root on the system (not applicable in the Pi context, of course).
P.S. Note that the same problem can happen with vi (vim). On startup, vi creates a directory on /tmp that it uses for certain tasks. If enough time goes by, that directory gets removed and then when you try to do something like pipe your vi buffer through an external program, strange error messages result. I've been bitten by this a few times in the past.
There are, of course, lots of workarounds one could imagine for this. Ideally, systemd-tmpfiles should be reconfigured to leave these files alone. Another approach might be to change whatever process creates the sock files to not put them in /tmp. Both of these fixes would be beyond my capabilities, however.
Any other good ideas would be welcomed.
BTW, the simple solution is for the user (that's me) to setup a cronjob to periodically "touch" the file or directory on /tmp, to keep the cleaner from messing with it. This is about the only solution if you do not have root on the system (not applicable in the Pi context, of course).
P.S. Note that the same problem can happen with vi (vim). On startup, vi creates a directory on /tmp that it uses for certain tasks. If enough time goes by, that directory gets removed and then when you try to do something like pipe your vi buffer through an external program, strange error messages result. I've been bitten by this a few times in the past.
Statistics: Posted by BigRedMailbox — Wed Dec 18, 2024 11:57 am — Replies 5 — Views 95