LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-29-2009, 12:13 PM   #1
mohitanchlia
Member
 
Registered: Aug 2008
Posts: 60

Rep: Reputation: 15
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
 
Old 06-29-2009, 01:19 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 06-29-2009, 02:01 PM   #3
mohitanchlia
Member
 
Registered: Aug 2008
Posts: 60

Original Poster
Rep: Reputation: 15
Why doesn't echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time work ?
 
Old 06-29-2009, 05:32 PM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
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?
 
Old 06-29-2009, 06:26 PM   #5
mohitanchlia
Member
 
Registered: Aug 2008
Posts: 60

Original Poster
Rep: Reputation: 15
Yes I am root. How can I give permissions?
 
Old 06-30-2009, 07:56 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation not permitted prasunhowlader Linux - Newbie 3 08-20-2008 09:29 PM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration