A little background: I have a ZFS dataset that I want to share across my LXCs, I need to be able to write to that dataset from the LXCs.
What I've done:
1. I now have write access to the dataset as the new user, but when I ssh into the container, it takes some time before I can log in and when I finally log in, I get the following:
I have tried logging in multiple times and it always took a long time to log in and I got that error. I found some a thread where somebody had a similar message, and the solution was to remove the file. When I tried to delete it as root, I got the "Permission denied" error. I thought that I should've made the changes to the config file before creating the user and tried that. I have a slightly different but similar problem now.
2. I have since created a new container, added the mp and uid mapping to the config, THEN added the "artem" user to the container. I get the following now:
I got this far, and tried to log in into the new container again and tinhere was no such error anymore... I think it's still worth posting as this may be helpful to others. But if anyone knows what I did wrong, please let me know. That would be highly appreciated.
What I've done:
- In the config of the container from which I intended to write to the dataset, I added
mp0: /data/set,mp=/mnt/point,backup=0
. I realized that I didn't have write permissions. Then I found this article and...
Note: This container already had the "artem" user that I later created in proxmox. - Created a new proxmox user.
- Changed the owner of the dataset to the new user.
- Added the following to the LXC config:
Code:lxc.idmap = u 0 100000 1000lxc.idmap = g 0 100000 1000 lxc.idmap = u 1000 1000 1 lxc.idmap = g 1000 1000 1 lxc.idmap = u 1001 101001 64534 lxc.idmap = g 1001 101001 64534
- In
/etc/subuid
, I addedroot:1000:1
. There are 3 lines now:
Code:root:1000:1 root:100000:65536 artem:165536:65336
- In
/etc/subgid
, I addedroot:1000:1
. There are the same three lines now as in/etc/subuid
.
1. I now have write access to the dataset as the new user, but when I ssh into the container, it takes some time before I can log in and when I finally log in, I get the following:
Code:
/usr/bin/xauth: timeout in locking authority file /home/artem/.Xauthority
2. I have since created a new container, added the mp and uid mapping to the config, THEN added the "artem" user to the container. I get the following now:
Code:
/usr/bin/xauth: file /home/artem/.Xauthority does not exist
ls -a /home/artem
shows that this file existsstat /home/artem/.Xauthority
's output:
Code:
File: /home/artem/.Xauthority
Size: 51 Blocks: 1 IO Block: 512 regular file
Device: 48h/72d Inode: 22863 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ artem) Gid: ( 1000/ artem)
Access: 2020-01-05 11:07:43.863121606 +0000
Modify: 2020-01-05 11:07:43.863121606 +0000
Change: 2020-01-05 11:07:43.863121606 +0000
Birth: -
I got this far, and tried to log in into the new container again and tinhere was no such error anymore... I think it's still worth posting as this may be helpful to others. But if anyone knows what I did wrong, please let me know. That would be highly appreciated.
Last edited: