On Wed, 2012-12-12 at 08:52 -0600, Serge Hallyn wrote: > Quoting Rob van der Hoeven (robvanderhoe...@ziggo.nl): > > I would really like an extra lxc.mount.cwd entry in the configuration > > file. Maybe this entry should be mandatory if the containers filesystem > > is different from the host filesystem because in this case the cwd > > By container fs is different you mean cwd is unreachable from > container's / right?
No. I'm not familiar with LXC internals but i assumed that a container setup that specifies mounts has its own mount namespace? If this is true then the container has its own private view of the filesystem (different from the host), and you can not safely copy/inherit filesystem state like the cwd from the host. (I was surprised that my setup gave me access to a directory on the host that should not have been accessible from the container) > > cannot be inherited safely. > > Adding a lxc.mount.cwd or lxc.chdir should be easy enough. I don't > think it should be required, as I could imagine a case where keeping > the init task in a now-unreachable dir is actually desired. But we > could support lxc.chdir = none for that case, whereas by default > (lxc.chdir = unspecified) it refuses to start if $cwd becomes > unreachable. The filesystem inside a container should *always* have a valid cwd (just like the filesystem of the host). I will be very happy with a lxc.chdir option! (I like the name, its better than lxc.mount.cwd) Will probably use it in all my lxc-execute configurations... Rob. http://freedomboxblog.nl ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users