LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   tcp_keepalive_time: Operation not permitted (https://www.linuxquestions.org/questions/linux-general-1/tcp_keepalive_time-operation-not-permitted-736444/)

mohitanchlia 06-29-2009 12:13 PM

tcp_keepalive_time: Operation not permitted
 
[apache2]# echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time
-bash: /proc/sys/net/ipv4/tcp_keepalive_time: Operation not permitted

MensaWater 06-29-2009 01:19 PM

Use the sysctl command:

sysctl net.ipv4.tcp_keepalive_time=300

Type "man sysctl" for more information.

Don't forget to update /etc/sysctl.conf if you want to have this change survive a reboot.

mohitanchlia 06-29-2009 02:01 PM

Why doesn't echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time work ?

salasi 06-29-2009 05:32 PM

Echoing stuff to proc may or may not work depending on distribution and permissions (and maybe SELinux and AppArmor, if you have one of those available, to make your life more interesting).

Were you root when you tried this?

mohitanchlia 06-29-2009 06:26 PM

Yes I am root. How can I give permissions?

MensaWater 06-30-2009 07:56 AM

What's your distro (with version)?

What's your kernel version?

What does "who am i" and "whoami" show you as when you try this?

Are you running SELinux as prior poster asked?

What's the permissions on /proc/sys/net/ipv4/tcp_keepalive_time?

Why don't you want to use sysctl?


All times are GMT -5. The time now is 11:47 PM.