Linux Cgroup writing to control files, working for CPU but not Device subsystem?
up vote
1
down vote
favorite
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
CPU subsystem permissions
Device subsystem permissions
Any help would be deeply appreciated, I've been stuck with this for so long and it just doesn't make sense to me.
linux centos permissions cgroups
add a comment |
up vote
1
down vote
favorite
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
CPU subsystem permissions
Device subsystem permissions
Any help would be deeply appreciated, I've been stuck with this for so long and it just doesn't make sense to me.
linux centos permissions cgroups
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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
CPU subsystem permissions
Device subsystem permissions
Any help would be deeply appreciated, I've been stuck with this for so long and it just doesn't make sense to me.
linux centos permissions cgroups
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
CPU subsystem permissions
Device subsystem permissions
Any help would be deeply appreciated, I've been stuck with this for so long and it just doesn't make sense to me.
linux centos permissions cgroups
linux centos permissions cgroups
asked Aug 6 '17 at 15:22
Robin Andersson
61
61
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f384324%2flinux-cgroup-writing-to-control-files-working-for-cpu-but-not-device-subsystem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown