Why do I get ”mount error(1): Operation not permitted“ on ”mount.cifs“ in a LXC container on a Proxmox VE machine?

28,806

Solution 1

You're probably running an unprivileged LXC container. The easiest solution is to use a privileged container instead. However, there might be other solutions; take a look e.g. at this thread/post in the proxmox forums.

Solution 2

I am not using any Containers, but on my Debian Workstation a have had a similar error a few weeks ago.

After some research I found a solution for me.

I had to add vers=2.0 to the options of the mount command.

Share:
28,806

Related videos on Youtube

myrdd
Author by

myrdd

Updated on September 18, 2022

Comments

  • myrdd
    myrdd over 1 year

    I've set up a new Debian 9 (stretch) LXC container on a machine running Proxmox VE, and installed the cifs-utils package. I quickly tested the connection to the SMB server by running

    smbclient //192.168.0.2/share -U myusername
    

    which worked fine. However, the command

    mount.cifs //192.168.0.2/share /mnt -o user=myusername
    

    failed, printing the following error message:

    mount error(1): Operation not permitted
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    

    I've made sure that…

    • the owner and group of the shared directory (on the SMB server, which is a FreeBSD machine) are both existent on the client, i.e., inside the container.
    • the owner of the shared directory is a member of the group, both on the server and the client. (id myusername)
    • the mountpoint (/mnt) exists on the client.

    What could be the cause of the above-mentioned error?