在Ubuntu 12.10服务器上,我创build了一个Ubuntu云lxc容器。 在/ var / lib / lxc / MY_CONTAINER / config文件中,我取消了注释:
lxc.aa_profile = unconfined
并启动了容器。
在容器内部,我尝试安装一个cifs文件系统:
sudo mount -t cifs //server/share /mnt
我得到这个:
mount error(13): Permission denied
与此同时在系统日志中:
[5200005.304634] type=1400 audit(1360130285.896:174): apparmor="DENIED" operation="mount" info="failed type match" error=-13 parent=6756 profile="lxc-container-default" name="/mnt/" pid=6757 comm="mount.cifs" fstype="cifs" srcname="//server/share" flags="rw"
我错过了什么?
你可能会错过的东西可能包括:
/etc/apparmor.d/lxc-containers您可能需要添加mount fstype=cifs,然后重新加载策略。 lxc.mount = /var/lib/lxc/MY_CONTAINER/fstab在这个fstab文件中,您可以创build与正常的fstab文件。