[SOLVED] vzdump as non-root user possible?

FloFaber

Member
Dec 16, 2022
3
0
6
Hello,

My ultimate goal is to vzdump a VM over SSH using a non-root user.

I have searched and tried for some time now but did not manage to find a working solution.

I have created a user named vzdumper via useradd and, for now, added him to the Administrator role.
However, when I login with this user and run vzdump 100 --mode snapshot --compress gzip I get the following error:
Code:
vzdumper@remoteserver:~# vzdump 104 --compress gzip
ipcc_send_rec[1] failed: Is a directory
ipcc_send_rec[2] failed: Is a directory
ipcc_send_rec[3] failed: Is a directory
Unable to load access control list: Is a directory

When I run the same command as root it works just fine.

I have also tried to to set read-permissions on /etc/pve/user.cfg because of the Unable to load access control list error. But that gives me just another error:
Code:
root@remoteserver /etc/pve# chmod 644 user.cfg
chmod: changing permissions of 'user.cfg': Operation not permitted

So my question is: Is it even possible to run vzdump as a normal, non-root user? Or am I doing something wrong?


Thanks.
 
no, it's not. you can call the equivalent API endpoint as API user though (the code will still run as root via pvedaemon though ;))
 
No, most of the command line tools are currently root only.

You could use programs like sudo or doas as a workaround.
 
No, most of the command line tools are currently root only.

You could use programs like sudo or doas as a workaround.
Yes, that was my next idea but I wondered if it was possible without it.

Alright, thank you very much.