LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2007, 12:10 PM   #1
kelmkone
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Rep: Reputation: 0
Editing conf files


Hi, im having trouble editing the conf files in linux red hat. im logged on as root but for some reason im not able to edit any of the config files, i can only view them. i figure this must be to do with some security setting, just wondering if anyone had any ideas.
thanks
 
Old 06-18-2007, 12:23 PM   #2
Okie
Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 977

Rep: Reputation: 36
sounds like SELinux doing its job, you will have to disable SELinux before editing any system files of this nature...
 
Old 06-18-2007, 12:24 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,969
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
Some configuration files are read only (even to root). To override this in vi you have to add a ! to your command to write and quit a read only file:

Code:
:wq!
To write a file that is read only but you DON'T want to quit:

Code:
:w!
 
Old 06-19-2007, 05:01 AM   #4
kelmkone
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for that I’ll give it a try, were about do you find SELinux by the way. also this is for custangro, what’s a Vi.
thanks again to both replies.
 
Old 06-19-2007, 06:35 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
vi is the default Unix editor, although on Linux it's usually symlinked (technical term) ie pointed to vim (vi improved).
You don't need to force writes like that, you just need to use the chmod cmd (see man page), but basically the permissions may not include write (w), so use something like this
chmod u+w filename

adds write priv to user (owner) of file.
check who the owner is first.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
editing conf files in red hat 8.0 kelmkone Red Hat 1 06-07-2007 09:31 AM
editing conf files Digitalsoldier Linux - Newbie 2 08-05-2005 07:59 AM
editing modles.conf thiqued Linux - Software 2 07-12-2004 04:56 PM
editing grub.conf dave37 Linux - Newbie 7 09-30-2003 08:10 AM
Editing modules.conf jatabe Linux - Networking 1 08-01-2003 02:47 AM


All times are GMT -5. The time now is 09:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration