impossible to mount cifs within LXC

rjcab

Active Member
Mar 1, 2021
66
1
28
45
Hello,

I have a fresh install container on Debian.
I try to mount a CIFS share:

Code:
root@TestInstallPVE:/mnt# mount.cifs 192.168.1.252:/diskint /mnt/diskintpve/
mount.cifs: bad UNC (192.168.1.252:/diskint)
root@TestInstallPVE:/mnt# mount.cifs //192.168.1.252/diskint /mnt/diskintpve/
Password for root@//192.168.1.252/diskint:
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
root@TestInstallPVE:/mnt# dmesg
dmesg: read kernel buffer failed: Operation not permitted
root@TestInstallPVE:/mnt# sysctl -w kernel.dmesg_restrict=0
sysctl: permission denied on key "kernel.dmesg_restrict"
root@TestInstallPVE:/mnt#

I have another container with same OS and same share which works.

Code:
root@srvtools:/# cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
192.168.1.252:/diskint /mnt/diskintpve/ nfs     defaults,user,auto,_netdev,bg 0 0
root@srvtools:/# df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/loop1                   9.8G  2.7G  6.6G  29% /
none                         492K  4.0K  488K   1% /dev
udev                          32G     0   32G   0% /dev/fuse
tmpfs                         32G   16K   32G   1% /dev/shm
tmpfs                         13G  136K   13G   1% /run
tmpfs                        5.0M     0  5.0M   0% /run/lock
192.168.1.252:/diskint       1.8T  366G  1.4T  21% /mnt/diskintpve
https://ewebdav.pcloud.com/  1.3T  763G  509G  61% /mnt/pcloud
root@srvtools:/#

If you have any ideas :-)