Bug#807769: systemd: /tmp mounted as tmpfs without user asking for it

2015-12-13 Thread Sanjoy Mahajan
Michael Biebl  writes:

> Have you read the comments in /etc/tmpfiles.d/tmp.conf ?
> You previously already had tmpfs-on-/tmp under sysvinit as you've set it
> in /etc/default/rcS.

I don't think so.  See the current /etc/default/rcS below.  It
is also the version almost from the beginning (according to etckeeper),
although I might well have modified it just before installing etckeeper.

> This setting was migrated when systemd was installed.
> Are you saying this setting was incorrectly migrated?

No.

> Can you attach your /etc/default/rcS?

Here it is:

#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
TMPTIME=-1

# spawn sulogin during boot, continue normal boot if not used in 30 seconds
#SULOGIN=no

# do not allow users to log in until the boot has completed
#DELAYLOGIN=no

# be more verbose during the boot process
#VERBOSE=no

# automatically repair filesystems with inconsistencies during boot
#FSCKFIX=no

> As for your question:
> If you want to get rid of tmpfs-on-/tmp, run systemctl disable tmp.mount

Thank you.  That seems reasonable.

> and then rm /etc/tmpfiles.d/tmp.conf

That will stop any tmp cleaning, which I don't like, but is a separate
issue from getting rid of tmpfs-on-/tmp.

-Sanjoy

___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers


Bug#807769: systemd: /tmp mounted as tmpfs without user asking for it

2015-12-13 Thread Sanjoy Mahajan
You're right, the /etc/default/tmpfs does set RAMTMP.  However,
/etc/fstab doesn't have an entry for /tmp (I don't have any partitions
other than /, except for /boot/efi).  That may explain why my /tmp
wasn't on tmpfs until some action much after the boot forced that to
happen even though /tmp already existed as a subdirectory of / (on the /
partition).

> Please also attach /etc/default/tmpfs

# Configuration for tmpfs filesystems mounted in early boot, before
# filesystems from /etc/fstab are mounted.  For information about
# these variables see the tmpfs(5) manual page.

# /run is always mounted as a tmpfs on systems which support tmpfs
# mounts.

# mount /run/lock as a tmpfs (separately from /run).  Defaults to yes;
# set to no to disable (/run/lock will then be part of the /run tmpfs,
# if available).
#RAMLOCK=yes

# mount /run/shm as a tmpfs (separately from /run).  Defaults to yes;
# set to no to disable (/run/shm will then be part of the /run tmpfs,
# if available).
#RAMSHM=yes

# mount /tmp as a tmpfs.  Defaults to no; set to yes to enable (/tmp
# will be part of the root filesystem if disabled).  /tmp may also be
# configured to be a separate mount in /etc/fstab.
RAMTMP=yes

# Size limits.  Please see tmpfs(5) for details on how to configure
# tmpfs size limits.
#TMPFS_SIZE=20%VM
#RUN_SIZE=10%
#LOCK_SIZE=5242880 # 5MiB
#SHM_SIZE=
#TMP_SIZE=

# Mount tmpfs on /tmp if there is less than the limit size (in kiB) on
# the root filesystem (overriding RAMTMP).
#TMP_OVERFLOW_LIMIT=1024

___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers


Bug#807769: systemd: /tmp mounted as tmpfs without user asking for it

2015-12-12 Thread Sanjoy Mahajan
Package: systemd
Version: 228-2
Severity: normal

-- Package-specific info:
-- BEGIN ATTACHMENTS --
/tmp/tmp.7IxkS3mmju/systemd-delta.txt
/tmp/tmp.7IxkS3mmju/systemd-analyze-dump.txt
/tmp/tmp.7IxkS3mmju/dsh-enabled.txt
/etc/fstab
-- END ATTACHMENTS --

   * What led up to the situation?

A bunch of reasonably important iceweasel-downloaded .pdf files in /tmp
suddenly disappeared.  I feared that I had misconfigured the
/etc/tmpfiles.d/tmp.conf and allowed automatic cleaning, but that file
was correct (prevented /tmp cleaning):

  # Automatically migrated from TMPTIME in /etc/default/rcS
  #d /var/tmp 1777 root root -
  d /tmp 1777 root root -

The syslog at around the time of the oldest remaining /tmp file showed
what had instead happened:

  Dec 11 07:24:57 insight dbus[671]: [system] Activating via systemd: service 
name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
  Dec 11 07:24:57 insight systemd[1]: tmp.mount: Directory /tmp to mount over 
is not empty, mounting anyway.
  Dec 11 07:24:57 insight systemd[1]: Mounting Temporary Directory...
  Dec 11 07:24:57 insight systemd[1]: Mounted Temporary Directory.
  Dec 11 07:24:57 insight systemd[1]: Starting Hostname Service...
  Dec 11 07:24:57 insight dbus[671]: [system] Successfully activated service 
'org.freedesktop.hostname1'
  Dec 11 07:24:57 insight systemd[1]: Started Hostname Service.

I had run 'hostnamectl' at around 7:24am, which activated the
org.freedesktop.hostname1 service, which then, via the 'PrivateTmp=yes'
line in dbus-org.freedesktop.hostname1.service used tmp.mount, which put
/tmp on tmpfs.

I got back my /tmp files by unmounting /tmp, so all was well.  But how
should I prevent it from happening again?  I don't want /tmp on tmpfs.
Should I just set PrivateTmp=no in that config?

I read bug #779902 and the patch in its msg #32
, but I am
still confused about whether setting it to No has other bad effects.

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser 3.113+nmu3
ii  libacl1 2.2.52-2
ii  libapparmor12.10-2+b1
ii  libaudit1   1:2.4.4-4
ii  libblkid1   2.27.1-1
ii  libc6   2.19-22
ii  libcap2 1:2.24-12
ii  libcap2-bin 1:2.24-12
ii  libcryptsetup4  2:1.6.6-5
ii  libgcrypt20 1.6.4-3
ii  libkmod221-1
ii  liblzma55.1.1alpha+20120614-2.1
ii  libmount1   2.27.1-1
ii  libpam0g1.1.8-3.1
ii  libseccomp2 2.2.3-2
ii  libselinux1 2.4-3
ii  libsystemd0 228-2
ii  mount   2.27.1-1
ii  sysv-rc 2.88dsf-59.2
ii  util-linux  2.27.1-1

Versions of packages systemd recommends:
ii  dbus1.10.4-1
ii  libpam-systemd  228-2

Versions of packages systemd suggests:
pn  systemd-container  
pn  systemd-ui 

Versions of packages systemd is related to:
ii  udev  228-2

-- no debconf information
___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers