I'm trying to setup Cgroups for a non-root user glassfish.
System setup:
- CentOS 7.2.1511
- Kernel 3.10.0-327.el7.x86_64
- Cgroup mounted at /sys/fs/cgroup
It should be possible to create a Cgroup for non-root user by issuing these commands:
- For CPU subsystem: - $ sudo mkdir /sys/fs/cgroup/cpu/${USER} $ sudo chown -R ${USER} /sys/fs/cgroup/cpu/${USER}
- For Devices subsystem: - $ sudo mkdir /sys/fs/cgroup/devices/${USER} $ sudo chown -R ${USER} /sys/fs/cgroup/devices/${USER}
This works for the CPU subsystem. Since I am able to write to control files as glassfish, such as cpu.cfs_period_us like below
    echo 43434 > cpu.cfs_period_us
But writing to the Devices subsystem such as
    echo 'a *:* rwm' > devices.deny
Results in the following error
    bash: echo: write error: Operation not permitted
Any help would be deeply appreciated, I've been stuck with this for so long and it just doesn't make sense to me.
