criu icon indicating copy to clipboard operation
criu copied to clipboard

permission question

Open jumbohei opened this issue 3 years ago • 3 comments

Hi, I have a question regarding to the permission and much appreciated for inputs. Let’s say if a user A who writes a program and runs as a user and then he/she wants to take a snapshot and I don’t want to give this person the root access. Is that doable? If yes, can user A goes into the image and modify the UID to 0, which is as root, to restore and run that application as root? Thanks!

jumbohei avatar May 22 '22 04:05 jumbohei

@jumbohei It might be worth looking at user namespaces. You can set UID=0 as follows:

$ id -u
1000
$ unshare -Umr bash
# id -u
0

rst0git avatar May 22 '22 15:05 rst0git

I don’t want to give this person the root access. Is that doable?

Yes, checkpoint/restore can be used with non-root users as well: https://github.com/checkpoint-restore/criu/pull/1155

rst0git avatar May 22 '22 15:05 rst0git

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Jun 22 '22 00:06 github-actions[bot]