On Sat 15 Mar 2025, Andras Korn wrote:
> On Sat, Mar 15, 2025 at 01:25:10PM +0100, Paul Slootman wrote:
> 
> > > I suggest that the default configuration be changed thusly:
> > > 
> > > TMPREAPER_PROTECT_EXTRA='/tmp/user/[0-9]*'
> > > TMPREAPER_DIRS='/tmp/. /tmp/user/*/.'
> > 
> > TMPREAPER_DIRS is the list of directories to search for old files, so
> > only the TMPREAPER_PROTECT_EXTRA list is what you want.
> 
> Even if /tmp/user (or a particular subdir under /tmp/user) is a mountpoint?

tmpreaper stays on the filesystem(s) the TMPREAPER_DIRS are on.
So if /tmp/user is a separate filesystem, you don't need to protect it
anyway as tmpreaper won't go there, unless you do specify /tmp/user/*/*
but I thought the point of this bug report was _not_ to delete stuff
under /tmp/user/* . If you do also want to remove files under /tmp/user/
that don't start with a digit, then sure, then it also needs to be added
to TMPREAPER_DIRS. Please let me know what the exact intention is.

> And won't the PROTECT_EXTRA also apply to the contents of /tmp/user/[0-9]*/?

I'm not sure what you mean with this. If you explicitly add
/tmp/user/[0-9]*/ to TMPREAPER_PROTECT_EXTRA then those of course will
be protected.

BTW I'll probably add --protect /tmp/user/[0-9]*  to the cron.daily
script instead of changing tmpreaper.conf .


Paul

Reply via email to