jfi -------- Original-Nachricht -------- Betreff: Re: [Lxc-users] Problem with: lxc.autodev=1 Datum: Sat, 20 Apr 2013 22:01:52 +0200 Von: Andreas Otto <aotto1...@t-online.de> An: m...@wittsend.com
Hi, thanks for the fast answer, if lxc version is: host# rpm -q lxc lxc-0.8.0-3.5.1.x86_64 -> this is the version from opensuse 12.3 my 'guest' has ... guest# ps -eaf | grep systemd root 24 1 0 19:48 ? 00:00:00 /usr/lib/systemd/systemd-logind message+ 28 1 0 19:48 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation root 955 1 0 19:48 ? 00:00:00 /usr/lib/systemd/systemd-journald my 'host' has too ... host# ps -eaf | grep systemd root 307 1 0 20:04 ? 00:00:00 /usr/lib/systemd/systemd-journald root 331 1 0 20:04 ? 00:00:00 /usr/lib/systemd/systemd-udevd root 525 1 0 20:04 ? 00:00:00 /usr/lib/systemd/systemd-logind message+ 567 1 0 20:04 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation root 16813 16684 0 21:48 ? 00:00:00 /usr/lib/systemd/systemd-logind usbmux 16817 16684 0 21:48 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation root 17755 16684 0 21:48 ? 00:00:00 /usr/lib/systemd/systemd-journald if i use pstree on my guest ... guest# pstree -a systemd ├─agetty --noclear console 38400 linux ├─agetty --noclear tty1 38400 linux ├─agetty --noclear tty4 38400 linux ├─agetty --noclear tty2 38400 linux ├─agetty --noclear tty3 38400 linux ├─agetty --noclear -s console 115200 38400 9600 ├─dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation ├─dhcpcd --netconfig -L -E -c /etc/sysconfig/network/scripts/dhcpcd-hook -t 0 -h nhi2 lxc_nhi2 ├─klogd -c 1 -x ├─rpcbind -w -f ├─rsyncd --daemon --no-detach ├─sshd -D │ └─sshd │ └─bash │ └─pstree -a ├─systemd-journal └─systemd-logind mfg AO Am 20.04.2013 21:33, schrieb Michael H. Warfield: > On Sat, 2013-04-20 at 21:13 +0200, Andreas Otto wrote: >> 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. > > I've seen this before when I set autodev=1 on a container which was NOT > running systemd for init. Reviewing the code and all, it looked like it > should be setting the correct permissions and yet it came out wrong for > several devices. In my case, I finally got my Fedora 17 containers > working fine (autodev=1 w/ systemd) and my Fedora 14 containers right > with autodev=0 w/o systemd. If I turned autodev=1 on the Fedora 14 > containers, it did what you're describing. That was back when we were > first working on the systemd support. I don't recall testing that > condition after we cut the patches loose for 0.9.0 that included systemd > support in both the containers and the host. > > 1) Is OpenSuse 12.3 running systemd init (I don't run OpenSuse and, > unfortunately, the lxc-opensuse template doesn't seem to work for me on > Fedora)? > > 2) What version of lxc are you running in the host? > > I may and try to recreate this with a fresh Fedora 14 container and see > if it still happens with 0.9.0 for me. It LOOKS like conf.c is doing > the right thing with umask when setting up autodev, at least in what's > in git. > >> a "normal" user is not able to use these devices ... >> example: login into an non-root-user account. >> >> > ssh dev01@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. >> >> >> mfg AO >> -- >> You can contact me by using XING: >> https://www.xing.com/profile/Andreas_Otto6 > > Regards, > Mike > -- You can contact me by using XING: https://www.xing.com/profile/Andreas_Otto6 ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users