Having searched the forums and finding nothing that helps with my senario, I am posting a new thread.
I am trying to mount a CIFS share in an unprivileged LXC container. The share mounts fine, and I can read from it, but when I try to write to it I get a "Permission denied". Writing to the shave as mounted on the host works just fine. Any pointers would be much appreciated.
My configuration is as below
HOST
media-mediaserver.mount
media-mediaserver.automount
LXC Container config
Clipped output from "mount" on host
Clipped output from "mount" on container
[/CODE]
I am trying to mount a CIFS share in an unprivileged LXC container. The share mounts fine, and I can read from it, but when I try to write to it I get a "Permission denied". Writing to the shave as mounted on the host works just fine. Any pointers would be much appreciated.
My configuration is as below
HOST
media-mediaserver.mount
Code:
[Unit]
Description=samba mount for sambafiles
Requires=systemd-networkd.service
After=network-online.target
Wants=network-online.target
[Mount]
What=//192.168.0.2/mediaserver
Where=/media/mediaserver
Options=ver=credentials=/etc/samba/smbcreds,iocharset=utf8,rw,x-systemd.automount
Type=cifs
TimeoutSec=30
[Install]
WantedBy=multi-user.target
media-mediaserver.automount
Code:
[Unit]
Description=samba automount for mediaserver
[Automount]
Where=/media/mediaserver
TimeoutIdleSec=0
[Install]
WantedBy=multi-user.target
LXC Container config
Code:
arch: amd64
cores: 1
hostname: Transmission
memory: 1024
mp0: /media/mediaserver,mp=/media/mediaserver
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=FE:EC:5A:2D:FF:CE,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-100-disk-0,size=8G
swap: 1024
unprivileged: 1
Clipped output from "mount" on host
Code:
//192.168.0.2/mediaserver on /media/mediaserver type cifs (rw,relatime,vers=3.1.1,cache=strict,username=guest,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.2,file_mode=0755,dir_mode=0755,iocharset=utf8,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,x-systemd.automount)
Clipped output from "mount" on container
Code:
//192.168.0.2/mediaserver on /media/mediaserver type cifs (rw,relatime,vers=3.1.1,cache=strict,username=guest,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.2,file_mode=0755,dir_mode=0755,iocharset=utf8,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
/CODE]
[/CODE]