Create unprivileged cgroups without root

812 views Asked by At

I want to create cgroups inside new namespaces in order to control the resource usage of processes as follows:

unshare --user --cgroup --mount --ipc --pid --net --uts -r --fork bash
mkdir -p my_cgroup/cpuset
mount -t cgroup -o cpuset cpuset ./my_cgroup/cpuset

But I cannot modify the cpuset folder as the folder's owner shows nobody. Is there any way to set up cgroups in the new namespaces that I have permission to access ?

0

There are 0 answers