changing swappiness - permission denied

2

2

I use "echo 0 > /proc/sys/vm/swappiness" to set swappiness but even if I'm root i've got access denied. Do you know what should I do to unlock it ?

oneat

Posted 2010-08-02T12:24:16.050

Reputation: 2 823

It may happen that even if SELinux status is disabled, one would get permission denied issues. – suresh – 2011-12-01T20:16:11.967

Answers

4

I suspect SELinux. Try getenforce and if it returns enforcing, you can temporarily disable SELinux with setenforce 0. For permanent disablement see /etc/selinux/config.

Before disabling SELinux you may try sysctl -w vm.swappiness=0.

Janne Pikkarainen

Posted 2010-08-02T12:24:16.050

Reputation: 6 717

2

You might want to check if SELinux is active. It imposes restrictions even on root.

The commmand sestatus will tell you if SELinux is active.

sleske

Posted 2010-08-02T12:24:16.050

Reputation: 19 887