[Lxc-users] Problem with: lxc.autodev=1

Frederic Crozat fcrozat at suse.com
Mon Apr 22 09:03:42 UTC 2013


Le lundi 22 avril 2013 à 10:43 +0200, Andreas Otto a écrit :
> Am 22.04.2013 10:28, schrieb Frederic Crozat:
> > Le samedi 20 avril 2013 à 21:13 +0200, Andreas Otto a écrit :
> >> Hi all,
> >>
> >> my problem: the "autodev" create devices with wrong permissions:
> >>
> >>   > ls -ald /dev/*
> >> crw-rw---- 1 root tty  136, 16 Apr 20 18:34 /dev/console
> >> lrwxrwxrwx 1 root root      11 Apr 20 18:34 /dev/core -> /proc/kcore
> >> lrwxrwxrwx 1 root root      13 Apr 20 18:34 /dev/fd -> /proc/self/fd
> >> crwxr-xr-x 1 root root   1,  7 Apr 20 18:34 /dev/full
> >> drwxr-xr-x 2 root root       0 Apr 20 18:34 /dev/hugepages
> >> prw------- 1 root root       0 Apr 20 18:34 /dev/initctl
> >> lrwxrwxrwx 1 root root       7 Apr 20 18:34 /dev/kmsg -> console
> >> srw-rw-rw- 1 root root       0 Apr 20 18:34 /dev/log
> >> drwxrwxrwt 2 root root      40 Apr 20 18:34 /dev/mqueue
> >> crwxr-xr-x 1 root root   1,  3 Apr 20 18:34 /dev/null
> >> lrwxrwxrwx 1 root root      13 Apr 20 18:34 /dev/ptmx -> /dev/pts/ptmx
> >> drwxr-xr-x 2 root root       0 Apr 20 18:34 /dev/pts
> >> crwxr-xr-x 1 root root   1,  8 Apr 20 18:34 /dev/random
> >> drwxrwxrwt 2 root root      40 Apr 20 18:34 /dev/shm
> >> lrwxrwxrwx 1 root root      15 Apr 20 18:34 /dev/stderr -> /proc/self/fd/2
> >> lrwxrwxrwx 1 root root      15 Apr 20 18:34 /dev/stdin -> /proc/self/fd/0
> >> lrwxrwxrwx 1 root root      15 Apr 20 18:34 /dev/stdout -> /proc/self/fd/1
> >> crwxr-xr-x 1 root root   5,  0 Apr 20 18:34 /dev/tty
> >> crw-rw---- 1 root tty  136, 12 Apr 20 18:34 /dev/tty1
> >> crw-rw---- 1 root tty  136, 13 Apr 20 18:34 /dev/tty2
> >> crw-rw---- 1 root tty  136, 14 Apr 20 18:34 /dev/tty3
> >> crw-rw---- 1 root tty  136, 15 Apr 20 18:34 /dev/tty4
> >> crwxr-xr-x 1 root root   1,  9 Apr 20 18:34 /dev/urandom
> >> crwxr-xr-x 1 root root   1,  5 Apr 20 18:34 /dev/zero
> >>
> >>
> >> check the permissions for "/dev/tty" or "/dev/null" as example.
> > Are you checking the permissions when the container is running or after
> > it was run ?
> while it was running.
> it was possible to change permission in the /dev by root after ....
> but every reebot it was gond ;-)

I know :) This is because /dev is mounted as a tmpfs when running with
systemd, so any change you do will be lost..

> >
> >> a "normal" user is not able to use these devices ...
> >> example: login into an non-root-user account.
> >>
> >>   > ssh dev01 at nhi2
> >> ...
> >> Last login: Sat Apr 20 18:34:29 2013 from linux02
> >> Have a lot of fun...
> >> -bash: /dev/null: Permission denied
> >> -bash: /dev/null: Permission denied
> >> -bash: /dev/null: Permission denied
> >>
> >> Im using opensuse 12.3 on the host and guest.
> >> The gues is a fresh lxc container.
> > Just to be sure: did you upgrade your system to 12.3 ? It could have an
> > "old" cache for the container generation (it should be fixed these days
> > when upgrading distro but you never know..).
> >
> This is a fresh 12.3 on host and on quest ...

Ok. I'll do more tests on my side. But you should open a bug report on
https://bugzilla.novell.com/ against openSUSE (and assign it to me) so
we don't loose it.

-- 
Frederic Crozat <fcrozat at suse.com>
SUSE





More information about the lxc-users mailing list