gedit and nautilus cannot modify file on SMB/CIFS share (file is busy)

Bug #323091 reported by ilpssun
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

I mount a Windows Share using mount.cifs. Everything works well including editing and saving file with vi and OpenOffice. Using gedit, I can create new files on the share and open existing ones. When I modify an existing file and try to save the changes, however, I get a “Unexpected Error: Text file busy”. Editing the same file with vi or any other program works well. Using gedit I can edit any other file on my computer including those on sftp mounts.

The same problem occurs with Nautilus: When I try to overwrite an existing file on the network share, I am told “Error while renaming temporary file: Text file busy”. I suspect the two errors have the same root cause but I'm not sure in which package it might be. Also I am not experienced in creating detailed logs for gedit or nautilus. Since my syslog and my messages don't show any entries related to the problem, I can't provide any detailed logs. I'll happily create a log of the problem if someone points out how it's done, though :-)

BTW, I use the following command line to mount the share:
/usr/bin/env PASSWD=$PASS /sbin/mount.cifs //wi-lsn/ls-in /home/ls-in -o user=tiha,dom=wi,iocharset=utf8,file_mode=0644,dir_mode=0755

The issue does NOT occur when I mount an SMB share that is provided by a Ubuntu system. The problematic SMB shares are provided by Windows file servers (one of them is running Windows XP).

Might be a duplicate to bug #34813 but I'm not quite sure as my behavior not only affects gedit but also nautilus.

ilpssun (ilpssun)
description: updated
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

This is a dupe of another bug already reported.

I'll try to find the original bug and link this to it

Revision history for this message
ilpssun (ilpssun) wrote :

Might be a duplicate to bug #34813 but I'm not quite sure as my behavior not only affects gedit but also nautilus.

description: updated
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

i would guess so.
please comment there and see if it is the same.

 unsubscribe

Revision history for this message
picardo (spocksplanet) wrote :

I am experiencing this exact issue. It's not at all similar to the #34813. Whereas that bug report describes the save working after several tries, in my case save never works, and the error message is different.

"Unexpected error: Error renaming temporary file: Text file busy"

Each save operation causes the creation of another temporary file (e.g., .goutputstream-QZ1VFV) on the network folder (which is actually a shared folder in the Host machine, Ubuntu is a gues on Virtualbox).

Revision history for this message
Nikhil (nikhilgk) wrote :

The duplicate status is wrong as picardo above reports, because I am also never able to save this. Perhaps this has to be reported as a new bug because I am also running Ubuntu 10.10 as a guest in Virtualbox and the file is being saved on a shared NTFS drive. The drive was mounted with the following two commands:

insmod /lib/modules/2.6.35-24-generic-pae/updates/dkms/vboxsf.ko
sudo mount.vboxsf <VirtualBox Shared Folder Name> <MountPoint>

Additionally, the following warning is also logged:
** (gedit:4065): WARNING **: Hit unhandled case 0 (Error renaming temporary file: Text file busy) in parse_error.

Revision history for this message
Eladon (regs8865) wrote :

I agree with Nikhil, this is not a duplicate. I get the same issue running an Ubuntu 10.10 Virtualbox under Windows 7 and mounting a virtualbox share. Basically makes running Ubuntu in a Virtualbox useless.

Revision history for this message
Eladon (regs8865) wrote :

Actually this is not just an issue with gedit and nautilus. For example, I use PCManFM, and if I copy a file to the mounted vbox share, the first copy is OK. But if I copy it again, and attempt an over-write, it gives the same "text file busy" error, and generates same temp file. So I was using neither gedit or nautilus and still same problem.

Here's a dialogue where vbox is blamed at the end:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594162

And here's where virtualbox.org says vbox is OK and it's gedit's fault (see bottom under "troubleshooting"):
http://forums.virtualbox.org/viewtopic.php?t=15868

So what next? Is this a fault with vbox?

Revision history for this message
Stuart Rossiter (monsieurrigsby) wrote :

Re the VirtualBox shared folders aspect of this problem. So there are two problems here, both stemming from gedit and Nautilus renaming open files as part of their overwrite process:

-- the Samba filesystem doesn't support this properly

-- the VirtualBox vboxsf filesystem doesn't support this properly

#34813 only covers the Samba root cause. The vboxsf one is in the Debian bug (can't find an Ubuntu equivalent):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594162

I've raised a VirtualBox bug to cover this issue:
http://www.virtualbox.org/ticket/9203

So, ideally, we should have a separate Ubuntu bug for this other root cause (vboxsf doesn't support open file overwrite). What's the normal procedure for things like this? Does someone want me to create this bug (or an admin do so themselves)?? Or can one link to the Debian bug as another bug this is a duplicate of (I think not)? Let me know and I'm happy to help....

Changed in ubuntu:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.