Can't save files to Samba (cifs) shares because they report 0 bytes free

Bug #373477 reported by Hugh G. Rection
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
High
gvfs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: gvfs

I have several shares on a Samba file server that I use from Windows and Ubuntu clients. The Windows clients all report the available free space correctly. The Ubuntu clients (versions 8.10 and 9.04) always report 0 bytes used and 0 bytes free when I view the connected folder's properties. See attachment.

This effectively makes writing to Samba shares impossible using Ubuntu. When saving files, some applications just warn about low disk space but others such as Photoshop 7 in wine just refuse to save files there.

The shares tried are both anonymous as well as authenticated.

Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

 * Is this reproducible?
 * If so, what specific steps should we take to recreate this bug?

 This will help us to find and resolve the problem.

Changed in gvfs (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :

Yes it's reproducible (and in my case it's never unreproducible).
Install Ubuntu 9.04.
Via the Places menu, choose "Connect to server" and connect to a Samba server.
After connection, an icon appears on the desktop. Right-click it and show the properties.
Then you see "0 bytes used" and "0 bytes free".

After that, go to a Windows XP client and connect to the exact same Samba share. There you'll see a larger than 0 bytes free value in the properties which is correct.

For what it's worth, my Samba server is version 3.0.34 on FreeBSD 7.1, and attached is the smb.conf

Revision history for this message
Sebastien Bacher (seb128) wrote :

why did you mention cifs in the topic?

Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :

Oh that's a mistake. I thought CIFS and Samba was the same thing, but the bug still remains.

Revision history for this message
Sebastien Bacher (seb128) wrote :

what is the issue exactly? you should rather describe the bug that trying to figure what is wrong when you don't know. the details dialog showing 0 space is "normal" but is not breaking copies

Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :

The bug is that because gvfs reports 0 bytes used and 0 bytes free, some applications either warn about no space available when saving files to the share, and other applications just refuse to save files to the share. I don't know how I can say it any more clearer as that is essentially what I initially said.

Revision history for this message
Sebastien Bacher (seb128) wrote :

can you copy something on the share using nautilus?

Revision history for this message
Sebastien Bacher (seb128) wrote :

when you open a bug upstream too you could mention it there

Changed in gvfs (Ubuntu):
status: Incomplete → Triaged
Changed in gvfs:
status: Unknown → New
Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :

Yes it works in Nautilus.

As another example, I just tried Gnome Commander. It doesn't work. As soon as I enter the ~/.gvfs directory GC shows "0 bytes free" and it stays that way no matter which connected share I navigate to. Then when I try to copy a file to the writeable share, GC shows an error dialog with "No space left on device".

Total Commander in Windows XP on the other hand shows the correct free disk space when I navigate to same share and of course allows copying.

Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :
Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :

... and I would have said it a few minutes earlier if the server had not replied with:

Please try again
Sorry, there was a problem connecting to the Launchpad server.

Try reloading this page in a minute or two. If the problem persists, let us know in the #launchpad IRC channel on Freenode.

Thanks for your patience.

Revision history for this message
Sebastien Bacher (seb128) wrote :

it's not clear that's a gvfs bug still, nautilus deal with that share correctly so gvfs is providing correct informations

Revision history for this message
Hugh G. Rection (cmanley-deactivatedaccount) wrote :

Well it's like this analogy:
Person A says "The ice is too thin because when people skate on it, they sink through."
status -> incomplete, priority -> low
Person B says "Do the ducks sink through?"
Person A says "No, but it's still to thin."
Person B says "Well if the ducks don't sink through then it's not to thin."
status -> bogus

Actually from many bug reports I've read after searching for solutions, this frequent recurring pattern of lets stick our heads in the dirt and pretend there are no bugs that made be very hesitant to file the bug report in the first place. I overcame the hesitance by feeling obliged to report it so that Ubuntu/Linux can be made a better OS. I now regret the wasted effort on my part. Linux will never ever become a mainstream desktop OS this way. Even if this was the only bug in Linux, it is enough in itself to not let it become mainstream as a desktop OS.

No offence and I also know I can't expect much from volunteers. I give up and I suppose I'm not the only one who feels this way.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue there is that you try to explain what is wrong without knowing rather than describing the issue and letting those who know the code to figure what is wrong. What the nautilus properties dialog describe is orthogonal to the issue, gvfs returns the free space correctly and nautilus manages to copy, so rather than trying to explain how gvfs returns that the disk has no space to the client (which is wrong since otherwise nautilus would not copy there) you should describe what you do to trigger the bug, but sure it's easier to blame people who try to understand the bug

Revision history for this message
Jörg (joten) wrote :

propably same issue here, I.m connectiong to a samba share (avm fritzbox with samba ver. 3.0.24) get a desktop icon when doubleclicking adress in bautilus is "smb:192.168.1.1/Transfer" and it has read write access without probs I can create files and copy files to this adress..
when in Openoffice or some other apps save dialog says "/home/joerg/.gvfs/transfer auf fritz.box" and now it gets funny ( i also opened this path directly in nautilus with the same behaviour ) i can create a new empty file but neither save a file nor copy a file to this path, error says not enough space on folder, 0 bytes available xxx needed.
access to the share is anonymous, system is ubuntu intrepid, kernek 2.6.27-14-generic, gvfs 1.0.2-0ubuntu3

Revision history for this message
Boris Burtin (boris-burtin) wrote :

I hit this problem too. When DVD Decrypter tries to write to my NAS share via ~/.gvfs, it keeps complaining that there's no space available. If I mount the share with "mount -t cifs", DVD Decrypter detects the amount of free space correctly. It is possible to copy files via ~/.gvfs, but this bug should be fixed, so that applications can correctly determine the amount of free space on the shared filesystem.

Revision history for this message
Boris Burtin (boris-burtin) wrote :

Even better: Nautilus' own CD copy feature won't work with ~/.gvfs:

* Go to "Computer"
* Right click on the CD icon
* Choose "Copy Disc..."
* Click "Write"
* Notice that the mounts are not displayed under "Places"
* Type the path under ~/.gvfs in the "Name" text box
* Hit OK

A dialog pops up: "File image creation failed. The selected location does not have enough space to store the disc image.

Revision history for this message
Philippe Joyez (ubuntu-5-pjoyez) wrote :

I experience similar problem with windows partitions mounted using gvfs-mount smb://.... in Karmic Koala. Some applications (thunderbird, mathematica, so far) refuse to write to these partitions saying they are full or my quota is exceeded (I can provide the exact messages if needed), while other apps work fine : Nautilus, OpenOffice, Gedit, Inkscape..... I have another machine running 8.04 where the exact same partitions are mounted using cifs in fstab, and no such problem occurs.

OK, as Sebastien Bacher said, the initial reporter was maybe making a logical connection too quickly, but I think there is no doubt now that some applications erroneously think that these gvfs mounted partitions are full. It could be good to change the title of this report, to make it more accurate, if possible.

Revision history for this message
Karl Frisk (karl-frisk) wrote :

in comment #13 s. bacher says 'it's not clear that's a gvfs bug still, nautilus deal with that share correctly so gvfs is providing correct informations'.

this is wrong.

right click in a nautilus-window showing a samba share, select properties. it says:
Free space: unknown
0 bytes used
0 bytes free
total capacity 0 bytes.

all these zeros are wrong in my case. is there any known workaround/fix?

Revision history for this message
Artyom Smirnov (smirnoffjr) wrote :

Actual version of gvfs is 1.4.3, but in Karmic Koala still 1.4.1. Two bugfix releases was skipped, thats very very bad. Judging by gvfs developer's comment in https://bugzilla.gnome.org/show_bug.cgi?id=581924#c5 this bug was fixed in 1.4.3. So this issue can be fixed and closed ~1.5 month ago. Is maintainer sleeping? :) Also very strange this ticked marked as 'Low' IMO.

Revision history for this message
Artyom Smirnov (smirnoffjr) wrote :

And yes, it was really fixed in 1.4.3. I just compiled smb gvfs backend and checked.

Revision history for this message
Artyom Smirnov (smirnoffjr) wrote :
Revision history for this message
Artyom Smirnov (smirnoffjr) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is fixed in the lucid version too

Changed in gvfs (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

the maintainer is not sleeping but that's a manpower issue and the bug is corner case one since most users use the gvfs-smb backend and not cifs mounts to browse things

Revision history for this message
Philippe Joyez (ubuntu-5-pjoyez) wrote :

I upgraded from Karmic to Lucid RC, confident that it would solve the problem (see comment #25). However, the problem is still there, unchanged: When I ask for the properties of a gvfs-mounted disk, I have the same result as in comment #23 above. The gvfs version is 1.6.0+git20100414-0ubuntu1

Was the fix really implemented or is this a regression which appeared since #25?
I can provide more info if needed.

Changed in gvfs (Ubuntu):
status: Fix Released → Confirmed
Changed in gvfs (Ubuntu):
status: Confirmed → Triaged
Changed in gvfs:
importance: Unknown → High
Revision history for this message
John Ching (jmyching) wrote :

I have the same problem in Maverick as well... In fact, Deja Dup cannot backup to a samba volume because the free space reported is unknown.

Revision history for this message
zzarko (zzarko-gmail) wrote :

I have the exact same bug in 11.04. I have two computers at home, both with Ubuntu, and one of them is booted to win from time to time. On the first machine I have two samba shares, and on 10.10 I made mounts to them using cifs. But, after update to 11.04, file transfer over this mounts became too slow (~500 kilobytes/s), and I opted for gvfs solution. But, gvfs access always reposts 0 bytes free, while cifs reports actual bytes free. Now, I'm using 2 links to each share - one with cifs (so, I can see the amount of free space), and one with gvfs (so, I can copy at relatively decent speed, ~5 megabytes/s: with maverick's cifs access I had ~10 megabytes/s). A bit stupid solution, I know, but I have nothing better for now. From win os, everything works as expected (it reports actual free space, and copy speed is ~10 megabytes/s). So, the problem is definitely in cifs (speed) and gvfs (free space).

Revision history for this message
zzarko (zzarko-gmail) wrote :

EDIT: Yesterday, I installed a fresh copy od 11.04 on client machine (I was hoping that something with the upgrade went wrong), but nothing changed...

Changed in gvfs:
status: New → Confirmed
Revision history for this message
Philippe Joyez (ubuntu-5-pjoyez) wrote :

In reply to zzarko's comment above (#30), I would like to mitigate.

I have found that things have improved in 11.04 if the server you are connecting to is a MS-Windows machine: Nautilus correctly reports free space and Libre Office doesn't fail writing to those servers anymore. For that kind of network shares, the problem is solved then.

However, when using gvfs to connect to a NAS that is a few years old and that is runing linux with samba, I still have the "zero byte free" issue. This really affects usability since for instance LibreOffice can't save to that share (general failure error), and other apps also have problems. So no improvement in that case. The workaround is then to use the regular mount -t cifs.

Tu sum up, with 11.04 you might be affected by this bug or not depending on the network target you are trying to reach.

See upstream thread http://bugzilla.gnome.org/show_bug.cgi?id=581924 for more info.

Changed in gvfs:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Is that still an issue?

Changed in gvfs (Ubuntu):
status: Triaged → Fix Committed
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Fix Committed → Incomplete
Revision history for this message
KeithG (grider-4) wrote :

In 12.04, it is still an issue. I run 13.10 at home and it appears fixed, there, but not in 12.04.

Using Wine/Excel 2007. Cannot open a file from the server share (windows domain), but need to use nautilus to get it local edit then put it back on server via nautilus.

Like I said, I think this is fixed in 13.10+, because I can VPN in and edit the files directly on the share from MSoffice running in Wine, but not in 12.04.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, closing since that's fixed in the current version. That could be a candidate for a precise SRU upload if somebody is interested working on/finding the change that needs backporting!

Changed in gvfs (Ubuntu):
status: Incomplete → Fix Released
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.