LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-24-2012, 11:24 AM   #1
vidyasagar6
Member
 
Registered: Nov 2012
Posts: 36

Rep: Reputation: Disabled
access file error


I m going to access some other user file and file having full permissions but i am getting following error


swap file by the name "/var/tmp/myfile.txt.swp"
owned by: tilak dated: Mon Dec 24 06:21:35 2012
file name: /home/bob/myfile.txt
modified: YES
user name: tilak host name: localhost.localdomain
process ID: 7997
While opening file "/home/electronics/manju/myfile.txt"

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /home/electronics/manju/myfil
e.txt"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/var/tmp/myfile.txt.swp"
to avoid this message.
"/home/electronics/manju/myfile.txt" [New File]
Press ENTER or type command to continue
 
Old 12-24-2012, 11:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Where in any of that does it say it's an error?

What it does say though, is *EXACTLY* how to deal with the issue it's encountered. Did you actually read any of that before pasting it?

for simplicity sake I can highlight the bit that says "delete the swap file "/var/tmp/myfile.txt.swp"", but there's little else we can say as that's an extremely useful message.
 
Old 12-24-2012, 11:40 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
To add to acid_kewpie

To check if the file is in use (option 1 in your message above), you can run ps -ef |grep myfile as shown below for file abc.txt (user liza is editing file abc.txt using vi)

Code:
wim@aa0:~$ ps -ef |grep abc.txt
liza      7802  7723  0 07:36 pts/3    00:00:00 vi abc.txt
wim       7804  7512  0 07:36 pts/1    00:00:00 grep abc.txt
wim@aa0:~$
The first line in the output (in this case) shows that user liza is editing the file (the second line in the output reflects the grep command and is not relevant). Ask the user to stop editing and quit vi.

If the first line does not show, you can delete the swp file (if you have permissions) or ask the 'owner' to delete it. This is usually, as indicated in option 2 in the message that you got, the result of a crash of the vi session (e.g. vi killed with a kill -9 pid_of_vi_session).
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS Large File Copies Fail - Error writing to file: Input/output error deck- Linux - Server 10 08-01-2022 02:30 AM
error- unable to access jar file fachhoch@gmail.com Linux - Newbie 2 05-31-2012 08:24 PM
software to access file system.. how to allow access for non root users? stdcinout Linux - Newbie 8 03-09-2010 12:55 PM
could not access GDM configuration file error buchalkalan Linux - Software 1 10-08-2005 04:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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