Installed a new drive and tried to give a user in a container permission, but not working


(mjr2015) #1

on the Host machine I have a new disk I installed. I created a user called SSD_WRITE and gave it ownership

@SERVER:/mnt$ ll /mnt/120GB/
drwxr-xr-x 3 SSD_WRITE root  4096 Feb  5 07:31 ./

@SERVER:/mnt$ id -u SSD_WRITE
122

@SERVER:/mnt$ cat /etc/subuid
user:100000:65536
lxd:122:1
root:122:1

@SERVER:/mnt$ sudo lxc config show uvideo
....
raw.idmap: uid 113 122
devices:
  SHARE:
    path: /mnt/VIDEOS
    source: /mnt/120GB/
    type: disk
  root:
    path: /
    pool: DATA
    type: disk

and inside the container

@uvideo:/mnt# ll
total 22
drwxr-xr-x 3 root root 4 Feb 8 09:47 ./
drwxr-xr-x 22 root root 22 Dec 23 08:16 …/
-rw-r–r-- 1 root root 3896 Feb 1 06:43 HISTORY
drwxr-xr-x 3 nobody nogroup 4096 Feb 5 07:31 VIDEOS/

@uvideo:/mnt# id -u unifi-video
113


(Stéphane Graber) #2

Your mapping above maps uid 113 on the host to uid 122 in the container, don’t you want the other way around?