LinuxQuestions.org
Help answer threads with 0 replies.
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 11-10-2010, 10:47 AM   #1
ramya victor
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
unable to save and exit from vi editor


i have done something while changing permission in vi editor. now when i open any file, i am not able to save and exit from it. when i type esc+shift:wq after opening a file. it says cant open file in write mode. please tell what to do? am a new user to fedora 9 and dont know much about it. please help
 
Old 11-10-2010, 11:11 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
*any* file? The file is probably just not writable. Or, you don't own the file. Or, the disk is full.
 
Old 11-10-2010, 11:23 AM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
Report here the results of two commands:

whoami

ls -l the.file.you.try.to.edit

In the command above -l is minus lowercase L.
 
Old 11-20-2010, 11:52 AM   #4
ramya victor
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
when i open *.pl files i get this error. i can open all files from my root account but from my local login account i am not able to open perl files. but i am able to open *.c, *.php etc files.

Last edited by ramya victor; 11-20-2010 at 11:55 AM.
 
Old 11-20-2010, 12:03 PM   #5
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Have you checked the permissions as per the previous suggestions?

From a shell prompt, logged in with your standard user account type the following and post the results:
Code:
whoami
groups
ls -l file.pl
Please replace file.pl with the file you are experiencing problems with
 
Old 11-20-2010, 12:10 PM   #6
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Looks like vi permissions are messed up. I am not that good with vi but I think you have messed with the virc or vi.rc. Hopefully you do not get these errors when logged in as root.
Some options I have are:
1. try a different editor for the timebeing nano or emacs should be there.
2. Create a new user and see if he is able to edit all files.
3. Reinstall vi - if you have the cd/dvd very simple logic can help you reinstall - else you would need to look the rpm or the source code up.
Lesson: Make sure you back up system generated files - specially when you are root.
 
  


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
Save Visudo and exit acbenny Linux - General 7 05-05-2011 12:33 PM
exit text editor donadoni Linux - Newbie 8 06-03-2009 06:19 AM
How to exit and save (or just to exit) inside a "make config" running command? scrat75 Linux - Kernel 6 09-05-2008 04:02 PM
[SOLVED] Run program on Linux Startuo (Save on exit won't work!) ziphem Linux - Newbie 1 01-13-2005 07:01 AM
http config program doesnt save and exit!!! benrose111488 Linux - Software 0 06-09-2004 08:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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