1

I have my computer start secure shell in a chroot system at boot. (All the normal directories are bind mounted in the chroot system /run, /dev, /dev/pts, /sys, /proc). After logging in to the chroot environment and trying to start screen, I receive the error.

Directory '/run/screen' must have mode 775

So I set chmod 775 /run/screen in my start scripts. Everything was working fine, but now I've run into a new problem. When I try to run screen on my computer host system, I receive the error.

Directory '/run/screen' must have mode 777

Mode 777 is the default permission at boot. So the permissions screen requires for the host and chroot are different for some reason. How can I get screen to run in both host and chroot environment?

Note: The host is Ubuntu Mate 18.04 LTS Bionic (graphical desktop), and the chroot is Debian 9 Stretch (headless personal server).

1

This sounds similar to this screen bug detailed for Ubuntu.

You are sharing the /run directory between your host and chroot, but I suspect they are running different versions of screen and the the Ubuntu one is exhibiting this bug and should be updated to a version that does not have this problem.

If that does not help fix things, post the versions and permissions of both of your screen binaries as well as the actual permissions of the shared /run directory.

  • I have the latest version of screen (4.6.2-1ubuntu1), but it appears that this bug report does match, and the bug is still persistent. I'm amazed that you found this bug report. You may be one of the most genius people on this site. I'm not 100% certain your answer is correct, but it looks right as far as I can understand. :) – Sepero Mar 1 at 4:32
  • Have you tried just replacing the bugged screen binary on the Ubuntu host with screen from your debian chroot? A bit of a hack, but then the behavior should be consistent. – GracefulRestart Mar 1 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.