On 08/05/14 11:44 AM, LANGLOIS Olivier PIS -EXT wrote:
>> -----Original Message-----
>> From: arch-general [mailto:arch-general-boun...@archlinux.org] On Behalf
>> Of Lukas Jirkovsky
>> Sent: Thursday, May 08, 2014 3:54 AM
>>
>> Please don't start another systemd flamewar. And BTW, automatic /tmp
>> cleaning was there since the beginning.
> 
> I agree to not start a flamewar but hopefully systemd devs do not consider 
> their SW as perfect and are looking to improve it by taking into 
> consideration the userbase complains about it.
> 
> Maybe automatic /tmp cleaning was there since the beginning but it appears 
> that it never worked on my systems until very recently after using ArchLinux 
> for over 2 years.

Several of the Arch developers are systemd developers, so it's not like
you're talking about a group of outsiders here. The /tmp cleaning
doesn't delete recently touched files (10 days), so perhaps you've never
noticed it before.

>> -----Original Message-----
>> From: arch-general [mailto:arch-general-boun...@archlinux.org] On Behalf
>> Of Paul Gideon Dann
>> Sent: Thursday, May 08, 2014 5:26 AM
>>
>> On Thursday 08 May 2014 09:53:41 Lukas Jirkovsky wrote:
>>> On Thu, May 8, 2014 at 9:46 AM, Christos Nouskas <n...@archlinux.us>
>> wrote:
>>>> On 8 May 2014 09:43, Olivier Langlois <oliv...@olivierlanglois.net> wrote:
>>>>> Since a recent update (I have first noticed a couple of weeks ago
>>>>> this new systemd enhancement), systemd started to automatically
>>>>> clean /tmp directory daily. This is not something that I like as I
>>>>> prefer to decide when to clean up and to manually perform the clean
>> up.
>>
>> The /tmp directory is intended for temporary files, after all. If you need 
>> them
>> to stick around, I'd recommend using /var/tmp. But yeah, masking the unit
>> file should solve this for you, I think.
> 
> I was forecasting that this comment would come when I wrote the original 
> request. While I agree with what you say, I think that it is reasonable to 
> let the user have the control over when it is cleaned. Without denaturing the 
> /tmp folder, I'm using it to experiment patches on some packages or launch 
> computation and store results into /tmp to return back at them the next 
> morning. I have been a bit shocked to find out one morning that my files have 
> been deleted by my system. IMHO, this goes against the rule of least surprise 
> which is a pillar of the unix philosophy.

Use your home directory. /tmp is a dangerous place since it's a shared,
world-writable ephemeral directory. The only things that are stored
there are temporary files used by currently open applications. In most
cases, $XDG_RUNTIME_DIR is a better choice (sockets, fifos, etc.).

> I understand that for some sysadmins it might be convenient to have an 
> automatic cleanup but IMHO they should explicitly set it up. I am not too 
> sure that this is a good default behavior.

It's good default behaviour, as long as you aren't abusing /tmp for
stuff it's not meant for.

> That being said, I'll try to mask the service. Thank you very much for your 
> replies.

You can override the /usr/lib/tmpfiles.d/tmp.conf file in
/etc/tmpfiles.d and get rid of the cleaning.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to