LinuxQuestions.org
Visit Jeremy's Blog.
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 10-09-2012, 03:19 AM   #1
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Rep: Reputation: Disabled
E212 cant open file for writing. I have root access


Hi guys,
i was editing network interfaces

i have the root access
Code:
[root@xxx]# uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023


Code:
/etc/network/interfaces" E212: Can't open file for writing
Press ENTER or type command to continue
i cant save changes after i modified the file.
any help?
thanks!

update,
i was able to modify vi /etc/sysconfig/network-scripts/ifcfg-eth0

Last edited by slowerogue; 10-09-2012 at 03:32 AM. Reason: update
 
Old 10-09-2012, 09:29 AM   #2
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 12.04/14.04, Scientific Linux 6.3/6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,799

Rep: Reputation: 157Reputation: 157
Note: Just because you're root, doesn't mean you can do things that can't be done. For instance, if you have a file's permissions set for read only, you can't normally edit it without changing permissions to read/write. Also, lock-files may block access to a service, etc. Think of root as "super-user," with pervasive authority to change things in the system,... not a "God mode," omnipotent and able to change the rules of the system.
 
Old 10-09-2012, 09:48 PM   #3
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Original Poster
Rep: Reputation: Disabled
i see tqtq
so how do i change it to read/write permission? thx
 
Old 10-09-2012, 10:25 PM   #4
ilesterg
Member
 
Registered: Jul 2012
Distribution: Arch, CentOS, OpenSUSE Tumbleweed KDE
Posts: 526

Rep: Reputation: 56
Code:
ls -l filename
would display the permission. from the above scenario, we could expect something like -r--r--r-- (no w). You could add permissions by issuing the following command
Code:
sudo chmod u+w filename
 
Old 10-10-2012, 02:30 AM   #5
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Original Poster
Rep: Reputation: Disabled
thank you veli much!
bb
 
  


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
Trying to edit a .spec file in vim (E212: Can't open files for writing) subharaj Linux - Software 1 02-14-2012 04:14 AM
perl - writing to file - keep open or only during write? eherron.lanline Programming 2 05-27-2011 08:28 PM
Deny root access to a given file phru Linux - Security 6 12-08-2010 12:06 PM
software to access file system.. how to allow access for non root users? stdcinout Linux - Newbie 8 03-09-2010 01:55 PM
how to open a port for remote access as root craftereric Linux - Newbie 2 08-11-2008 12:38 PM


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