2

Good <Insert Part of Day>,

I am currently having an issue with several of my boxes running CentOS 7.3.1611 wherein the permissions for /var/run/screen are being changed to 775, resulting in the error "Directory '/var/run/screen' must have mode 755". The boxes have been running for several weeks without a restart or package upgrades, the issue was discovered earlier today. There is one sudoer on the boxes, with no signs of intrusion.

Changing the permissions back is simple, but we still have no idea what keeps happening. Does anyone have any ideas we can look into?

sssssss340
  • 21
  • 1
  • 3
  • I don't have any CentOS systems around, but on all of the Linux systems where I looked the permissions were 775. So I suspect 775 is actually the correct permissions, and something else is wrong. Which group does it belong to? – kasperd Jul 14 '17 at 23:49

1 Answers1

3

I don't have a CentOS box handy but assuming it uses systemd it may be similar to Ubuntu where there is /usr/lib/tmpfiles.d/screen-cleanup.conf with:

d /var/run/screen 0775 root utmp

and /lib/systemd/system/systemd-tmpfiles-clean.timer with

[Timer]
OnUnitActiveSec=1d

So it will reset to 0775 daily. You can disable it by linking /etc/tmpfiles.d/screen-cleanup.conf to /dev/null

However as @kasperd said, you probably have some other misconfiguration.

Note: I have not tested this.

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
  • 1
    Currently I have no file named `screen-cleanup.conf`, instead having one named `screen.conf` containing: `d /var/run/screen 0755 root screen` I have verified that my timer is set to 1d. – sssssss340 Jul 15 '17 at 04:34
  • 1
    I changed this to 0755 and it fixed my problem – Simoyd Feb 06 '18 at 02:26