LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-07-2001, 06:27 PM   #1
skopje909
LQ Newbie
 
Registered: Nov 2001
Distribution: Red Hat 6.2
Posts: 17

Rep: Reputation: 0
Question Read/write permission


I am having trouble changing the permissions on a file. I edited the file, but got the error when I went to save it. I am trying tp edit /etc/services file. If I do a "ls -ld services" it returns :
-rw-r--r-- 1 root root

How can I change it to enable the root to edit and save it...sounds like someone has hacked into it....
When I try to the chmod command it returns :
chmod : /etc/services : Operation not permitted.


Any help....
 
Old 11-08-2001, 05:26 AM   #2
lsof
Member
 
Registered: Oct 2001
Distribution: red hat 7
Posts: 58

Rep: Reputation: 15
r u logged in as root?
 
Old 11-08-2001, 07:47 AM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Re: Read/write permission

Quote:
Originally posted by skopje909
I am having trouble changing the permissions on a file. I edited the file, but got the error when I went to save it. I am trying tp edit /etc/services file. If I do a "ls -ld services" it returns :
-rw-r--r-- 1 root root

How can I change it to enable the root to edit and save it...sounds like someone has hacked into it....
When I try to the chmod command it returns :
chmod : /etc/services : Operation not permitted.


Any help....
With these settings the root user are allowed to edit the file.
You are probably not logged in as root.

root has read and write permission
the group root has read permission
and all others have read permission
 
Old 11-08-2001, 02:08 PM   #4
skopje909
LQ Newbie
 
Registered: Nov 2001
Distribution: Red Hat 6.2
Posts: 17

Original Poster
Rep: Reputation: 0
Exclamation

Yes, I am logged in as root...I am thinking that it will not let you write to it if the file is either being used or being updated in real-time....
 
Old 11-08-2001, 02:41 PM   #5
infernal
Member
 
Registered: Oct 2001
Location: /dev/null
Distribution: Debian, Slackware
Posts: 44

Rep: Reputation: 15
try lsattr

and look that you have the ŽiŽ attribute dissable for that file

man chattr

"...A file with the ŽiŽ attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser can set or clear this attribute."
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
set permanent read-write permission on shares Randall Slack Linux - Networking 1 10-30-2005 08:54 PM
share read and write permission to users suguname Mandriva 3 01-18-2005 12:53 AM
Read and Write permission jing Linux - Newbie 3 07-13-2004 10:33 PM
For Squid (proxy server) gurus: FTP from browser with read-write-modify permission Zingaro2002 Linux - Software 5 11-24-2003 04:56 AM
Open office read only, K-write read/write mode lwtvh Linux - Newbie 1 07-19-2003 11:33 AM


All times are GMT -5. The time now is 08:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration