9

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?

3 Answers 3

13

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.

2

Try using all variables mentioned below.

sudo mount -t cifs //<IPAddress>/<FromDirectory> /<ToDirectory> -o uid=xxx,username="xxxxx",password="xxxxx",domain="xxxxx",sec=ntlm,vers=2.0
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .