Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508634 - app-misc/screen-4.2.0-r1 - screen: Cannot make directory '/run/screen': Permission denied
Summary: app-misc/screen-4.2.0-r1 - screen: Cannot make directory '/run/screen': Permi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-24 19:29 UTC by Tobias Leupold
Modified: 2014-04-30 15:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Leupold 2014-04-24 19:29:00 UTC
When updating from screen-4.0.3-r6 to screen-4.2.0-r1, the program has to be started once as root to work for normal users. Otherwise, one gets:

Cannot make directory '/run/screen': Permission denied

After having started screen once as root, it works as user as before. Perhaps, this directory should be added by the ebuild.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-25 19:04:34 UTC
We cannot add /run/screen directory to the ebuild as /run is a tmpfs mount which gets completely wiped with every reboot:

  # mount | grep /run
  tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,size=824240k,mode=755)

Usually the problem you described should not happen as the ebuild installs the file /etc/tmpfiles.d/screen.conf which creates /run/screen with correct permissions.

Please check if the file is available and has the following content:

  # cat /etc/tmpfiles.d/screen.conf
  d /run/screen 0775 root utmp

Oh and please post your "emerge --info" output.
Comment 2 Tobias Leupold 2014-04-25 19:54:35 UTC
The file exists:

# cat /etc/tmpfiles.d/screen.conf
d /run/screen 0775 root utmp

Is it possible that it works normally after a reboot? I don't have that problem anymore now, it only occured directly after the upgrade.

Here's my emerge --info:

Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.2
KiB Mem:     3917244 total,   1860120 free
KiB Swap:    3976080 total,   3976080 free
Timestamp of tree: Thu, 24 Apr 2014 19:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local science
Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -msse4.1 -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1 -ggdb"
DISTDIR="/usr/src/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="        http://mirror.netcologne.de/gentoo/     http://ftp.uni-erlangen.de/pub/mirrors/gentoo/       http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ "
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage/tree"
PORTDIR_OVERLAY="/var/portage/local /home/tobias/tmp/sci"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvb dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv jpeg kde kipi lcms ldap libnotify lm_sensors mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl ssse3 startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb vim-syntax vorbis wmf wxwidgets x264 xcb xcomposite xine xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-dib0700" ELIBC="glibc" GPSD_PROTOCOLS="nmea" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" LIRC_DEVICES="pctv" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-30 14:42:31 UTC
I was able to reproduce this and I gonna try to get a fix available.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-30 14:52:40 UTC
As a workaround, you should be able to set SCREENDIR to a suitable directory.

/run/screen may not have been a good choice to begin with. In fact, since we (apparently) wouldn't care about the contents of the directory across reboots, why don't we settle for /tmp/screens as suggested in the manual or simply /tmp/screen?
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-30 15:21:07 UTC
+*screen-4.2.1-r1 (30 Apr 2014)
+
+  30 Apr 2014; Lars Wendler <polynomial-c@gentoo.org> -screen-4.2.1.ebuild,
+  +screen-4.2.1-r1.ebuild:
+  Move rundir back to /var/run as screen also works on non-linux systems where
+  /run doesn't exist. Create that directory immediately after the merge to
+  catch the gap between merge and reboot (bug #508634).
+
+*screen-4.2.1-r2 (30 Apr 2014)
+
+  30 Apr 2014; Lars Wendler <polynomial-c@gentoo.org> -screen-4.2.1-r1.ebuild,
+  +screen-4.2.1-r2.ebuild:
+  Another revbump to move screen's rundir to /tmp as /var/run doesn't get wiped
+  on reboot.
+