#316 remove /var/run/nologin
Closed: Fixed 6 years ago Opened 6 years ago by akostadi.

Please remove /var/run/nologin from fedora container image. If one installs SSHd inside, the file is preventing any connections.

On Fedora 24 and 25 SSHd was working OOB. I'm not sure whether the file was there or not.

I was advised to move issue from bugzilla here:
https://bugzilla.redhat.com/show_bug.cgi?id=1478984


Yep:

$ docker run --rm -ti registry.fedoraproject.org/fedora:25 ls -al /run
total 0
drwxr-xr-x. 2 root root  6 Jun 29 05:47 .
dr-xr-xr-x. 1 root root 46 Aug  7 19:54 ..
$ docker run --rm -ti registry.fedoraproject.org/fedora:26 ls -al /run
total 4
drwxr-xr-x. 10 root root 145 Jun 27 13:28 .
dr-xr-xr-x.  1 root root  46 Aug  7 19:54 ..
drwxr-xr-x.  2 root root   6 Jun 27 13:28 console
drwxr-xr-x.  2 root root   6 Jun 27 13:28 faillock
drwxr-xr-x.  3 root root  20 Jun 27 13:28 lock
drwxr-xr-x.  2 root root   6 Jun 27 13:28 log
-rw-r--r--. 15 root root  42 Jun 27 13:28 nologin
drwxr-xr-x.  2 root root   6 Jun 27 13:28 sepermit
drwxr-xr-x.  2 root root   6 Jun 27 13:28 setrans
drwxr-xr-x.  9 root root 113 Jun 27 13:28 systemd
drwxr-xr-x.  2 root root   6 Jun 27 13:28 user
-rw-rw-r--. 15 root utmp   0 Jun 27 13:28 utmp

See https://pagure.io/fedora-kickstarts/c/93205adc7d1a7942829f2fd8c9305863e786a490?branch=master

did that commit introduce this issue? That commit should have only limited where the tmpfiles got created, not the fact that they did get created, right?

I'm not sure why on fedora 25 SSHd ignored the nologin file but IMO it shouldn't be part of the base image. I don't see valid use cases for it.

akostadi: because there was no /run/nologin file in the fedora 25 image:
docker run registry.fedoraproject.org/fedora:25 ls /run/nologin.

Oh, misread original comment. Cool. Can we remove those?

Metadata Update from @dustymabe:
- Issue assigned to dustymabe
- Issue tagged with: containers

6 years ago

this is in rawhide and f26. The next container image release will contain this change. If you don't want to wait til the next release you can download an image from here:

https://kojipkgs.fedoraproject.org/compose/Fedora-Docker-26-20170816.0/compose/Docker/x86_64/images/

Metadata Update from @dustymabe:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata