Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking container permissions ? #8

Open
sgtwtf opened this issue Aug 14, 2024 · 0 comments
Open

breaking container permissions ? #8

sgtwtf opened this issue Aug 14, 2024 · 0 comments

Comments

@sgtwtf
Copy link

sgtwtf commented Aug 14, 2024

I have a container, and I want to use userid 1026. I run the script run.py 1026. I get the output below and paste it into my config and edit the two etc/sub*id files as listed

Add to /etc/pve/lxc/<container_id>.conf:

lxc.idmap: u 0 100000 1026
lxc.idmap: u 1026 1026 1
lxc.idmap: u 1027 101027 64509
lxc.idmap: g 0 100000 1026
lxc.idmap: g 1026 1026 1
lxc.idmap: g 1027 101027 64509

Add to /etc/subuid:

root:1026:1

Add to /etc/subgid:

root:1026:1

I pop that into my ###.config file and reboot the container. the files are still being created as 100000 and I went to update the root password in the container to access a webui and I can't run sudo anymore.
I thought this config file was mapping 0 in the container to 1026 outside of the container
"sudo: /etc/sudo.conf is owned by uid 100000, should be 0
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

this is repeatable btw. I'm setting up a backup server appliance using the helper script and I'm trying to connect to a nas share.
had this issue. killed the container reran the setup script. edited the config again by just nano'ing and adding the mount point and the idmap edits above and then the permissions in the container are lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant