LinuxQuestions.org
Review your favorite Linux distribution.
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 08-24-2010, 01:56 AM   #1
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
Write operations being performed on file with read-only access


Hi,
I'm having this problem wherein the ppp program is altering the /etc/resolv.conf file when connecting.This, despite me having set file permissions to read-only. What could be the problem here? Please advise.
 
Old 08-24-2010, 07:12 PM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
Frequently it is not so much modifying the file as over-writing it with a new one.

What are you using to establish your PPP connection?

--thymox
 
Old 08-25-2010, 03:38 AM   #3
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
I'm using the pon script that comes along with ppp (I use pon <peer-name> to connect). Now, this isn't the ppp package that comes packaged with Slack. I've compiled it (although the same version).

Last edited by corbis_demon; 08-25-2010 at 03:40 AM.
 
Old 09-01-2010, 08:33 AM   #4
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
Well, okay, how do I stop a process from overwriting a file?
 
Old 09-01-2010, 08:50 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
'chattr +i /etc/resolv.conf' makes the file immutable. As a side effect this may cause an application to show an error message saying that can't write to the file.
 
Old 09-01-2010, 09:24 AM   #6
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
I tried doing that, and this is what I got:

Code:
chattr: Inappropriate ioctl for device while reading flags on /etc/resolv.conf
 
Old 09-01-2010, 09:38 AM   #7
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
I read the man page for chattr and lsattr, and found it's supposed to work on ext2 & ext3 filesystems. I, on the other hand, run reiser. What do I need to do?
 
Old 09-01-2010, 11:41 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by corbis_demon View Post
What do I need to do?
Either 0) change file systems ;-p or 1) try to live with this "feature" or 2) find out which applications write to /etc/resolv.conf, disable any DNS-related options in their configs and see if it works.
 
Old 09-01-2010, 01:01 PM   #9
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Is reiserfs still supported since Hans got sent up?
 
Old 09-02-2010, 12:53 AM   #10
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
Okay, I changed some parameters in the /etc/ppp/options file, and now resolv.conf seems to be holding it's own. Appreciate all the help, fellas.
 
  


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
Finding hard drive usage (read/write operations, and so forth) kenneho Linux - Server 8 02-18-2009 02:25 AM
Slow read/write operations on 3592 drive Joejr4u Linux - Hardware 2 03-17-2008 05:25 AM
Folder/File sharing and read/write access? JET-33 Linux - Server 2 04-04-2007 11:13 PM
monitor file read/write access johnyang Linux - Software 11 04-16-2006 01:56 PM
which is the best file system for read write access from linux and windows tomank Linux - Newbie 4 04-05-2004 08:48 AM

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

All times are GMT -5. The time now is 09:28 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