LXC and mount point. Permission denied - again!

stubbo66

New Member
Apr 2, 2024
16
1
3
I am fast running out of hair trying to get these bind mounts working. I've followed every instruction on the link but I am still getting Permission Denied messages whenever I try to access any folders from any of the LXC hosts other than using root.

So, I'll start at the beginning....

I have a zfsRaid on my proxmox server that I want to use as shared storage between all LXCs that need access to the content. Currently I have one I'm using for Samba to expose the drive to windows, and another running plex.

The drive is mounted through fine, and following the uid and gid mapping rules I can see that from the host the permissions are the same as when viewed from either LXC.

I have created a user (dave) and group (storage-users) and mapped them to the same uid and gid values in each LXC so they can be used to access the drive.

But this is all I get.....

Code:
dave@fileserver:/mnt$ cd Multimedia/
-bash: cd: Multimedia/: Permission denied
dave@fileserver:/mnt$ ls -l
total 15
drw-rw-rw- 7 dave storage-users 7 Apr  1 18:32 Files
drw-rw-rw- 5 dave storage-users 5 Mar 31 15:04 Multimedia

There has to be something I'm missing. I even watched a you tube video and walked through every step, but I noticed that even on there he was logged in as root all the time, and that never fails, but is no use when you need to use the actual uid or gid permissions properly.

I'm new to proxmox...can you tell? So please be kind!
 
You should show us the ls -la from the host too. And the LXCs config file. And the subuid/subgid files.
 
Last edited:
Thanks...here goes

This is the ls -la as seen from the LXC
Code:
root@fileserver:/mnt# ls -la
total 24
drwxr-xr-x  4 root root           4 Apr  1 18:19 .
drwxr-xr-x 17 root root          23 Apr  2 10:44 ..
drw-rw-rw-  7 dave storage-users  7 Apr  1 18:32 Files
drw-rw-rw-  5 dave storage-users  5 Mar 31 15:04 Multimedia

and this is what it looks like from proxmox
Code:
root@proxmox1:/zfsRaid/shared# ls -la
total 16
drwxr-xr-x 4 dave storage-users 4 Apr  1 18:07 .
drwxr-xr-x 3 root root          3 Apr  1 18:57 ..
drw-rw-rw- 7 dave storage-users 7 Apr  1 19:32 Files
drw-rw-rw- 5 dave storage-users 5 Mar 31 16:04 Multimedia

lxc config file
Code:
arch: amd64
cores: 2
features: nesting=1
hostname: fileserver
memory: 1024
mp0: /zfsRaid/shared/Files,mp=/mnt/Files,shared=1
mp1: /zfsRaid/shared/Multimedia,mp=/mnt/Multimedia,shared=1
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:56:C9:F7,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-zfs:subvol-101-disk-0,size=8G
swap: 1024
unprivileged: 1
lxc.idmap: u 0 100000 1005
lxc.idmap: g 0 100000 1005
lxc.idmap: u 1005 1005 1
lxc.idmap: g 1005 1005 1
lxc.idmap: u 1006 101006 64530
lxc.idmap: g 1006 101006 64530

/etc/subuid
Code:
root:1005:1
root:100000:65536
dave:165536:65536

/etc/subgid
Code:
root:1005:1
root:100000:65536
dave:165536:65536

Appreciate the assistance.
 
I should say I created the user and group with the correct uid and gid values on proxmox as well so I could see that the names were mapping correctly
 
From proxmox
Code:
root@proxmox1:~# id dave
uid=1005(dave) gid=1005(storage-users) groups=1005(storage-users),100(users)

From the LXC
Code:
root@fileserver:/mnt# id dave
uid=1005(dave) gid=1000(dave) groups=1000(dave),1005(storage-users)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!