Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On an Ubuntu 12.10 server, I created an Ubuntu cloud lxc container. In the /var/lib/lxc/MY_CONTAINER/config file, I uncommented the line:

lxc.aa_profile = unconfined

and started the container.

Inside the container, I try to mount a cifs file system:

sudo mount -t cifs //server/share /mnt

And I get this:

mount error(13): Permission denied

Along with this in the system logs:

[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"

What am I missing?

share|improve this question
    
I think I have the same problem. I haven't tried yet, but I am guessing things will work if you put the mount in /var/lib/lxc/CONTAINER/fstab (instead of actually mounting from within the container). – Adrian Ratnapala Apr 24 '13 at 15:05

Things you might be missing may include:

  • You seem to have apparmor running, configured so that it is preventing the mount operation in this profile. You could temporarily disable apparmor to verify if this is the only thing preventing your command. In /etc/apparmor.d/lxc-containers you may have to add mount fstype=cifs, and reload the policy.
  • The cloud template is for openstack / EC2 etc, the bare Ubuntu server may not qualify. That can lead to some mysterious errors.
  • Best practice is to include an fstab in the container configuration file to mount something in the container: lxc.mount = /var/lib/lxc/MY_CONTAINER/fstab In this fstab file you can create entries just as you are used to in normal fstab files.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.