You are not logged in.

#1 2013-09-21 12:15:40

dsana123
Member
Registered: 2013-08-27
Posts: 19

[SOLVED] Files in the /tmp directory are being deleted

Hi,

I've been using Arch Linux for four weeks, but have now come across a problem which I can't fix after trying to search for a solution (and also checking to see if anyone also had the same problem). I would appreciate any help you can give.

A few days ago the web browsers I use (chromium and opera) lost their profile settings, and I had to set the profiles. This kept happening and the indicator of the problem was that I use profile-sync-daemon for both web browsers, which uses the /tmp directory. I then started noticing that a file I created in /tmp disappeared which pointed me to the fact that something was cleaning up the /tmp directory (this seems to happen hourly).

A quick search led me to systemd-tmpfiles and the /usr/lib/tmpfiles.d/tmp.conf file. I have not modified the file, and if I have read it correctly only files in the /tmp directory that are more than 10 days old are deleted. I boot every day, so no files should be deleted by systemd-tmpfiles (unless I've misunderstood tmpfiles.d).


Here is the tmp.conf file anyway:

$ cat /usr/lib/tmpfiles.d/tmp.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# See tmpfiles.d(5) for details

# Clear tmp directories separately, to make them easier to override
d /tmp 1777 root root 10d
d /var/tmp 1777 root root 30d

# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
X /var/tmp/systemd-private-*/tmp

The /etc/tmpfiles.d directory is empty, so /usr/lib/tmpfiles.d is the only location for the tmpfiles.d config files:

$ ls /etc/tmpfiles.d/
$ 

Here is the list of packages I upgraded/installed for the last few days. systemd 207-3 seems the likeliest candidate, but I have not come across any reports about the problem I am having.

[2013-09-17 19:30] [PACMAN] Running 'pacman -Syu'
[2013-09-17 19:30] [PACMAN] synchronizing package lists
[2013-09-17 19:30] [PACMAN] starting full system upgrade
[2013-09-17 19:34] [PACMAN] upgraded bluez-utils (5.7-1 -> 5.8-1)
[2013-09-17 19:34] [PACMAN] upgraded cogl (1.14.0-4 -> 1.14.0-5)
[2013-09-17 19:34] [PACMAN] upgraded dbus (1.6.12-1 -> 1.6.14-1)
[2013-09-17 19:34] [PACMAN] upgraded dialog (1.2_20130523-2 -> 1.2_20130902-1)
[2013-09-17 19:34] [PACMAN] installed efivar (0.6-1)
[2013-09-17 19:34] [PACMAN] upgraded efibootmgr (0.6.0-3 -> 0.6.0.138.1132342-1)
[2013-09-17 19:34] [ALPM-SCRIPTLET] Generating locales...
[2013-09-17 19:34] [ALPM-SCRIPTLET]   en_GB.UTF-8... done
[2013-09-17 19:34] [ALPM-SCRIPTLET] Generation complete.
[2013-09-17 19:35] [PACMAN] upgraded glibc (2.18-3 -> 2.18-4)
[2013-09-17 19:35] [PACMAN] upgraded gnome-desktop (1:3.8.3-2 -> 1:3.8.4-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-color-manager (3.8.2-1 -> 3.8.3-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-settings-daemon (3.8.4-2 -> 3.8.5-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-control-center (3.8.4.1-2 -> 3.8.5-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-themes-standard (3.8.3-1 -> 3.8.4-1)
[2013-09-17 19:35] [PACMAN] upgraded libpng (1.6.3-1 -> 1.6.5-1)
[2013-09-17 19:35] [PACMAN] upgraded libusbx (1.0.16-2 -> 1.0.17-1)
[2013-09-17 19:35] [PACMAN] upgraded linux-firmware (20130725-1 -> 20130903-1)
[2013-09-17 19:35] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2013-09-17 19:35] [ALPM-SCRIPTLET] >>> Generating initial ramdisk, using mkinitcpio.  Please wait...
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Starting build: 3.11.1-1-ARCH
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Image generation successful
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Starting build: 3.11.1-1-ARCH
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: bfa
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: smsmdtv
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2013-09-17 19:35] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Image generation successful
[2013-09-17 19:35] [PACMAN] upgraded linux (3.10.10-1 -> 3.11.1-1)
[2013-09-17 19:35] [PACMAN] upgraded openssh (6.2p2-1 -> 6.3p1-1)
[2013-09-17 19:35] [PACMAN] upgraded orc (0.4.17-1 -> 0.4.18-1)
[2013-09-17 19:35] [ALPM-SCRIPTLET]
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> The file /etc/sysctl.conf has been removed from this
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> package, as all its settings are now kernel defaults.
[2013-09-17 19:35] [ALPM-SCRIPTLET]
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> If you had customized it, you need to rename it as
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> /etc/sysctl.d/99-sysctl.conf since from version 207 on
[2013-09-17 19:35] [ALPM-SCRIPTLET] ==> systemd only applies settings from /etc/sysctl.d/* .
[2013-09-17 19:35] [ALPM-SCRIPTLET]
[2013-09-17 19:35] [PACMAN] upgraded procps-ng (3.3.8-2 -> 3.3.8-3)
[2013-09-17 19:35] [PACMAN] upgraded raptor (2.0.9-2 -> 2.0.10-2)
[2013-09-17 19:35] [PACMAN] upgraded xorg-xinput (1.6.0-1 -> 1.6.1-1)
[2013-09-17 19:36] [PACMAN] Running 'pacman --color auto -U /tmp/yaourt-tmp-dsana/PKGDEST.u70/profile-sync-daemon-5.40.1-1-any.pkg.tar.xz'
[2013-09-17 19:36] [PACMAN] upgraded profile-sync-daemon (5.40-1 -> 5.40.1-1)
[2013-09-18 20:35] [PACMAN] Running 'pacman -Syu'
[2013-09-18 20:35] [PACMAN] synchronizing package lists
[2013-09-18 20:35] [PACMAN] starting full system upgrade
[2013-09-18 20:35] [ALPM] warning: /etc/systemd/journald.conf installed as /etc/systemd/journald.conf.pacnew
[2013-09-18 20:35] [ALPM-SCRIPTLET] ==> systemd 205 restructures the cgroup hierarchy and changes internal
[2013-09-18 20:35] [ALPM-SCRIPTLET]     protocols. You should reboot at your earliest convenience.
[2013-09-18 20:35] [ALPM-SCRIPTLET] ==> The "timestamp" hook for mkinitcpio no longer exists. If you used
[2013-09-18 20:35] [ALPM-SCRIPTLET]     this hook, you must remove it from /etc/mkinitcpio.conf. A "systemd"
[2013-09-18 20:35] [ALPM-SCRIPTLET]     hook has been added which provides this functionality, and more.
[2013-09-18 20:35] [PACMAN] upgraded systemd (204-3 -> 207-3)
[2013-09-18 20:35] [PACMAN] upgraded systemd-sysvcompat (204-3 -> 207-3)
[2013-09-18 20:35] [PACMAN] upgraded udisks2 (2.1.0-3 -> 2.1.1-1)
[2013-09-19 20:46] [PACMAN] starting full system upgrade
[2013-09-19 20:48] [PACMAN] Running 'pacman -Rns psd'
[2013-09-19 20:48] [PACMAN] Running 'pacman -Rns profile-sync-daemon'
[2013-09-19 20:48] [PACMAN] removed profile-sync-daemon (5.40.1-1)
[2013-09-19 20:48] [PACMAN] removed rsync (3.0.9-6)
[2013-09-19 20:49] [PACMAN] Running 'pacman -Rns chromium'
[2013-09-19 20:49] [PACMAN] Running 'pacman -Syu'
[2013-09-19 20:49] [PACMAN] synchronizing package lists
[2013-09-19 20:49] [PACMAN] starting full system upgrade
[2013-09-19 20:50] [PACMAN] upgraded chromium (29.0.1547.65-1 -> 29.0.1547.76-1)
[2013-09-19 20:50] [PACMAN] upgraded xvidcore (1.3.2-1 -> 1.3.2-2)
[2013-09-19 20:58] [PACMAN] Running 'pacman --color auto -U /tmp/yaourt-tmp-dsana/PKGDEST.ZDK/chromium-pepper-flash-stable-2:11.8.800.170-1-x86_64.pkg.tar.xz'
[2013-09-19 20:58] [PACMAN] upgraded chromium-pepper-flash-stable (2:11.8.800.97-1 -> 2:11.8.800.170-1)

EDIT: journalctl doesn't show me anything interesting, other than the fact that chromium complains when it realizes that its profile data has gone missing.

Last edited by dsana123 (2013-09-21 16:02:48)

Offline

#2 2013-09-21 13:41:13

cookies
Member
Registered: 2013-01-17
Posts: 253

Re: [SOLVED] Files in the /tmp directory are being deleted

By default /tmp is created as a tmpfs, which is completely stored in RAM, so whatever you place there won't survive a reboot. Up to this point everything should be as expected. The hourly cleanup should not happen, though (at least not as a default). Do you have a cronjob running somewhere that might do some cleanup?

BTW what gets deleted during this hourly cleanup? Just your browser profiles or some random files? Or everything in /tmp?

Offline

#3 2013-09-21 14:12:06

dsana123
Member
Registered: 2013-08-27
Posts: 19

Re: [SOLVED] Files in the /tmp directory are being deleted

I think I have found the problem.

There was a gnome update earlier in the week. gnome-settings-daemon runs an hourly housekeeping job. I had set the "Automatically Purge Temporary Files" in the Privacy tab when setting up my laptop last month.

gnome-settings-daemon has decided to delete files in the /tmp directory (I can trigger this by clicking "Purge Temporary files" which then deletes my files in the /tmp directory). This does not happen in the previous gnome-settings-daemon. Anyway, I'll mark the thread SOLVED if my file in the /tmp directory survives the hour!

[2013-09-17 19:35] [PACMAN] upgraded gnome-desktop (1:3.8.3-2 -> 1:3.8.4-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-color-manager (3.8.2-1 -> 3.8.3-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-settings-daemon (3.8.4-2 -> 3.8.5-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-control-center (3.8.4.1-2 -> 3.8.5-1)
[2013-09-17 19:35] [PACMAN] upgraded gnome-themes-standard (3.8.3-1 -> 3.8.4-1)

Offline

Board footer

Powered by FluxBB