Bug 598620 - Nautilus fails to write to windows share
Nautilus fails to write to windows share
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
13
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Guenther Deschner
Fedora Extras Quality Assurance
:
: 615332 (view as bug list)
Depends On:
Blocks: 654408 654426
  Show dependency treegraph
 
Reported: 2010-06-01 14:07 EDT by Nicholas Kudriavtsev
Modified: 2011-03-19 06:27 EDT (History)
19 users (show)

See Also:
Fixed In Version: samba-3.5.8-74.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 654408 654426 (view as bug list)
Environment:
Last Closed: 2011-03-19 06:27:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
gvfsd debug output (2.27 MB, text/plain)
2010-06-03 08:15 EDT, Nicholas Kudriavtsev
no flags Details

  None (edit)
Description Nicholas Kudriavtsev 2010-06-01 14:07:15 EDT
Description of problem:
Nautilus fails to write to windows share

Version-Release number of selected component (if applicable):
nautilus-2.30.1-3.fc13.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create a windows share with "Application -> Places -> Connect to server"
2. Open the share's folder on desktop
3. Drop a file to the folder
  
Actual results:
Get the error: Error while copying "somefile.ext".
There was an error copying the file into smb://xx%5Bxxx;name@server/external1/user.
Invalid argument

Expected results:
File is copied to the share

Additional info:
Coping the file from command prompt `cp somefile.txt '~/.gvfs/my share'` is OK.

Also, it isn't good that error message reveals user credentials for a share.
Comment 1 Nicholas Kudriavtsev 2010-06-01 14:12:02 EDT
Oops! Forgot to mention. Nautilus reads files from the windows share just fine.
Comment 2 Tomáš Bžatek 2010-06-02 06:30:38 EDT
(In reply to comment #0)
> Additional info:
> Coping the file from command prompt `cp somefile.txt '~/.gvfs/my share'` is OK.
This is weird. Can you try using gvfs-copy? This seems to be like a fault when setting mtime or any additional attributes.
Comment 3 Nicholas Kudriavtsev 2010-06-02 14:50:59 EDT
With gvfs-copy I've got the same error as with Nautilus.

But I found out something new. The problem exists with files lengthy than 16KB. If a file has length less than 16KB it is copied OK with Nautilus, if a file is lengthier it is copied no more than 48KB and fire out the error. Coping is fine with cp command. 

And about revealing the password - it is my fault, I mixed domain name and password while creating the bookmark for the share :(
Comment 4 Tomáš Bžatek 2010-06-03 06:20:00 EDT
Interesting, can you please provide version of the libsmbclient package?

Also, can you please grab output of `GVFS_SMB_DEBUG="99" GVFS_DEBUG="1" /usr/libexec/gvfsd -r` and attach it here - it may contain useful information.
Comment 5 Nicholas Kudriavtsev 2010-06-03 08:15:41 EDT
Created attachment 419347 [details]
gvfsd debug output

Output from `GVFS_SMB_DEBUG="99" GVFS_DEBUG="1" /usr/libexec/gvfsd -r`

libsmbclient.x86_64 - 3.5.3-61.fc13
Comment 6 Nicholas Kudriavtsev 2010-06-16 14:48:01 EDT
The same with gvfs.x86_64 - 1.6.2-1.fc13
Comment 7 seamus 2010-07-09 03:50:22 EDT
The same error in Nautilus.i686 when copy files to Windows 2003 x64.
Copied only 48KB then "Invalid argument".

Versions:
nautilus-2.30.1-3.fc13.i686
libsmbclient-3.5.4-62.fc13.i686
Comment 8 Tomáš Bžatek 2010-07-19 12:25:30 EDT
(In reply to comment #7)
> The same error in Nautilus.i686 when copy files to Windows 2003 x64.
> Copied only 48KB then "Invalid argument".
> 
> Versions:
> nautilus-2.30.1-3.fc13.i686
> libsmbclient-3.5.4-62.fc13.i686    
Can you verify that uploading files via smbclient works and so does "cp somefile.txt '~/.gvfs/my share'" ?
Comment 9 Joël Wijngaarde 2010-07-20 04:23:09 EDT
- Copying using 'cp' WORKS

- Copying using 'gvfs-copy' FAILS with message "Invalid argument"

- Copying using 'smbclient' WORKS

So the problem seems to be with gvfs-copy
Comment 10 Tomáš Bžatek 2010-07-21 10:39:32 EDT
*** Bug 615332 has been marked as a duplicate of this bug. ***
Comment 11 Tomáš Bžatek 2010-07-23 08:03:45 EDT
Just tested file copy using nautilus and gvfs-copy to clean Windows 2003 Server x64 machine with libsmbclient-3.5.4-62.fc13.x86_64 and everything works as expected. Is there anything specific set on the server? This is difficult to debug, I can't see anything obvious from the daemon log attached.
Comment 12 Nicholas Kudriavtsev 2010-07-23 08:57:28 EDT
Windows 2003 EE Server SP2 with default network settings - writes with error. I've got the same result over local connection and over Internet VPN. But now writes no more then 64KB of file. 16KB "magic" length seems preserved.

libsmbclient-3.5.4-62.fc13.x86_64
gvfs-1.6.2-1.fc13.x86_64
nautilus-2.30.1-3.fc13.x86_64
Comment 13 Nicholas Kudriavtsev 2010-07-23 09:14:18 EDT
With Samba share on local network write is OK!
Comment 14 Ricardo Alonso 2010-07-23 15:24:49 EDT
The cp command to .gvfs/my share with big files (>300MB) fails with the same message:
"Invalid argument"
Comment 15 Nicholas Kudriavtsev 2010-07-26 06:24:52 EDT
I have no errors with cp command. Tested on a 600MB length file, local network.
Comment 16 Fredrik Jönsson 2010-09-02 04:10:05 EDT
FYI We are seeing the same problems trying to access servers from Fedora 13 since they were upgraded to Windows 2008 R2 this summer.
Comment 17 Fredrik Jönsson 2010-09-02 04:13:35 EDT
I should add some Fedora version information:

gvfs-1.6.2-1.fc13.x86_64
gvfs-smb-1.6.2-1.fc13.x86_64
libsmbclient-3.5.4-63.fc13.x86_64
nautilus-2.30.1-6.fc13.x86_64
Comment 18 Brianna 2010-09-02 10:25:16 EDT
(my original details: https://bugzilla.redhat.com/show_bug.cgi?id=615332)

I have a D-Link DNS-321 NAS sitting in my office and found that I get the same error (Error while copying "filename") when using Nautilus to try an copy files to the D-Link (navigated & authenticated against the D-links' "Windows Share" in Nautilus).

If I mount the D-Link manually (or add it to fstab) it works correctly.
Comment 19 Joël Wijngaarde 2010-09-22 08:05:50 EDT
Is there anything we can do to help resolve this bug? i.e. debug information or anything from the windows server side. I'm not a Windows expert, but if you point me in a direction I can try and maybe to get some information from the windows side.
Comment 20 Simon Scott 2010-10-17 06:17:03 EDT
Just wondering if there is an update for this one please?

I have the same issue writing to shares on my Windows 2008 R2 server. Also have found that OpenOffice 3 Writer is unable to save files to the windows share.

Thank you.
Comment 21 Nicholas Kudriavtsev 2010-10-17 11:54:31 EDT
As I know there is no update and no activity to found out a solution :(
Comment 22 Felix Schwarz 2010-10-18 02:48:05 EDT
I think the issue is related to SMB signing (or whatever the correct term is). Disabling SMB signing via a group policy on your Windows server and try again to confirm that this is the real issue.
Comment 23 Tomáš Bžatek 2010-10-18 06:04:19 EDT
This is more a samba fault, gvfs code has not been changed for a long time and it's actually so simple that's difficult to influence this.

We need a good reproducer to be able to investigate this issue more and handle it to samba developers if needed. The issue doesn't appear with cleanly installed Windows 2003 Server in default configuration on local network.

There's samba-3.5.6-69.fc13 build available in updates-testing, can you give it a shot please?
Comment 24 Fredrik Jönsson 2010-10-18 07:56:10 EDT
As stated previously, this fault occured this summer, probably after SP2. So a clean install of Windows 2003 server is not sufficient to reproduce. At least SP2 and possibly later patches must be applied.

As long as the debugging is on the client side I can help, it is a bit harder for me to get much support on the server side due to system-boundary issues and lack of resources, but if I can get proper instructions on how to get necessary data I can try to get it from the windows staff.
Comment 25 Felix Schwarz 2010-10-18 09:23:44 EDT
The first thing to know is if SMB signing is enabled. You should be able to find that out also via Wireshark + the right modules.
Comment 26 Nicholas Kudriavtsev 2010-10-18 11:54:30 EDT
samba-3.5.6-69.fc13 doesn't change the thing.

Security policies for client and server:
Digitally sign communications (always) - Disabled
Digitally sign communications (if server agrees) - Enabled

No help. So I didn't reboot the Windows Server after I changed the policy.
Comment 27 Nicholas Kudriavtsev 2010-10-18 12:00:06 EDT
Security policies were:

Microsoft network client: Digitally sign communications (always) - Not Defined
Microsoft network client: Digitally sign communications (if server agrees) - Not Defined

Microsoft network server: Digitally sign communications (always) - Enabled
Microsoft network server: Digitally sign communications (if server agrees) - Enabled
Comment 28 John Kissane 2010-10-20 04:51:00 EDT
I've been doing some testing of this as two users have complained that transferring files with Krusader didn't work any more when they moved to Fedora 13. Presumably it's the same underlying issues as with Nautilus?

It works fine with Fedora 12 (ie it can transfer any sized file) but doesn't work on Fedora 13 (or the beta of Fedora 14) where only small files (~ less than 32kb) can be copied.

The Windows servers was the same for all the tests.

If there's anything I can do to help get this solved just let me know.
Comment 29 Simon Scott 2010-10-21 03:19:18 EDT
Likewise - I have limited resources and am a complete Linux newbie but happy to help if I can.
Comment 30 Johnson Lai 2010-10-27 23:49:52 EDT
I have the same problem with invalid argument, and only to manage of creating small text files. 

Certainly there was a connection and correct authorization between networks. I doubt my windows 2003 SBS settings or the hardware were incorrect because i can make connections using OS (Windows 7) of a different partition on the same computer. Something isn't right about 64bit Fedora 13. 

The Linux version i had was 2.6.33.3-85.fc13.x86_64
smbclient Version 3.5.5-68.fc13
Gnome Nautilus 2.30.1

Hopefully a patch coming out soon, cause isn't very productive!
Comment 31 Johnson Lai 2010-10-27 23:51:33 EDT
Another thing, the file size limit to 48kb before it hits error, if copy over the nautilus explorer.
Comment 32 Fredrik Jönsson 2010-11-02 03:39:15 EDT
To add a bit more details: mounting works, i.e, using a command such as the one below and writing to the mount-point works fine.

mount -t cifs -o "user=username,domain=Domain" server:/share /mountpoint

"Mounting" with nautilus does not work and the files get truncated after 48kb. 

Your request of:

"The first thing to know is if SMB signing is enabled. You should be able to
find that out also via Wireshark + the right modules."

Is a little bit too unspecific for me to spend time on it, especially since I very much doubt this is the issue.

Best regards
Comment 33 Ricardo Alonso 2010-11-02 10:12:05 EDT
In Fedora 14 i couldn't reproduce the problem

gvfs-1.6.4-2.fc14.x86_64
gvfs-smb-1.6.4-2.fc14.x86_64
libsmbclient-3.5.6-69.fc14.x86_64
nautilus-2.32.0-1.fc14.x86_64

It works perfectly with a 350Mb file.
Comment 34 John Kissane 2010-11-02 11:19:42 EDT
(In reply to comment #33)
> In Fedora 14 i couldn't reproduce the problem
> 
> gvfs-1.6.4-2.fc14.x86_64
> gvfs-smb-1.6.4-2.fc14.x86_64
> libsmbclient-3.5.6-69.fc14.x86_64
> nautilus-2.32.0-1.fc14.x86_64
> 
> It works perfectly with a 350Mb file.

I updated my Fedora 14 VM just now which pulled in the same version of the libsmbclient package as you and I still see the same problem where I cannot copy a file from Fedora to the Windows Server. It stops & leaves a file of size 32kb in the directory. No problem copying in the opposite direction.
Comment 35 Nicholas Kudriavtsev 2010-11-03 08:58:12 EDT
Just upgraded to Fedora 14. The problem is still here. :(
Comment 36 Joël Wijngaarde 2010-11-05 03:33:28 EDT
(In reply to comment #33)
> In Fedora 14 i couldn't reproduce the problem
> 
> gvfs-1.6.4-2.fc14.x86_64
> gvfs-smb-1.6.4-2.fc14.x86_64
> libsmbclient-3.5.6-69.fc14.x86_64
> nautilus-2.32.0-1.fc14.x86_64
> 
> It works perfectly with a 350Mb file.

I just dit a clean install of Fedora 14 32bit, same problem still exists. Did you do a *clean* install? Did you add some additional packages? Only difference between packages listed above is 32 bit vs 64 bit...
Comment 37 Ricardo Alonso 2010-11-05 09:03:15 EDT
I did an upgrade from Fedora 13 to 14 using yum (both 64 bit). I don't know if there are others packages involved in this operation. I have some extensions like these:

nautilus-2.32.0-1.fc14.x86_64
nautilus-python-0.7.0-2.fc14.x86_64
nautilus-sendto-2.31.7-1.fc14.x86_64
rabbitvcs-nautilus-0.13.3-2.fc14.x86_64
brasero-nautilus-2.32.0-1.fc14.x86_64
nautilus-extensions-2.32.0-1.fc14.x86_64
totem-nautilus-2.32.0-1.fc14.x86_64
evince-nautilus-2.32.0-1.fc14.x86_64

but I can't say if they are involved in the process of gvfs. I did the tests again with 1,5k, 15Mb and 350Mb in both directions (copy to windows share and then copy it again to my machine).
Comment 38 John Kissane 2010-11-05 10:29:48 EDT
(In reply to comment #37)
> I did an upgrade from Fedora 13 to 14 using yum (both 64 bit). I don't know if
> there are others packages involved in this operation. I have some extensions
> like these:
> 
> nautilus-2.32.0-1.fc14.x86_64
> nautilus-python-0.7.0-2.fc14.x86_64
> nautilus-sendto-2.31.7-1.fc14.x86_64
> rabbitvcs-nautilus-0.13.3-2.fc14.x86_64
> brasero-nautilus-2.32.0-1.fc14.x86_64
> nautilus-extensions-2.32.0-1.fc14.x86_64
> totem-nautilus-2.32.0-1.fc14.x86_64
> evince-nautilus-2.32.0-1.fc14.x86_64
> 
> but I can't say if they are involved in the process of gvfs. I did the tests
> again with 1,5k, 15Mb and 350Mb in both directions (copy to windows share and
> then copy it again to my machine).

Didn't have some of those packages but even after installing it made no difference. Copying large files to the Windows sever fails still, I did some testing with a text file & the largest file I can copy over is 16384 bytes long ie.

[jkissane@fedora14 Desktop]$ ls -l
total 16
-rw-rw-r--. 1 jkissane jkissane 16384 Nov  5 14:26 jk.txt
Comment 39 Oded Arbel 2010-11-08 02:52:10 EST
I have the exact same problem in both Fedora 14 and Ubuntu 10.10: copying using Nautilus gvfs mounts or Dolphin KIO mounts fails with the error "Invalid Argument" after about 48K.

Copying with the gvfs-copy command also fails with the same problem, but copying with the smbclient command works well.

The server is Windows 2003 SBS.

The relevant bug report in GNOME's bugzilla is this: https://bugzilla.gnome.org/show_bug.cgi?id=588391 - this is the original bug report coordinated with Debian and Ubuntu which was eventually fixed by Jeremy Allison in Samba's tree. On the face of it this looks to be the same problem, which means a regression in Fedora's samba 3.5.6.
Comment 40 Manilal 2010-11-10 02:36:35 EST
Confirmed this bug in Fedora 14

nautilus-2.32.0-1.fc14.x86_64
libsmbclient-3.5.6-69.fc14.x86_64
gvfs-smb-1.6.4-3.fc14.x86_64
Comment 41 Oded Arbel 2010-11-11 06:14:13 EST
Adding Guenther Deschner (Samba packager in Fedora) to CC list. Guenther - if you're not the right person to handle this, I apologize in advance.

Apparently this bug is fixed by Jeremy Allison's patch in GNOME's Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=633937 . 

I've tested the patch and it seems to work well in KDE using Dolphin (I haven't tested GVFS as I'm having some GNOME configuration issues). 

According to Jeremy Allison this patch is scheduled for inclusion in the Samba 3.5.7 upstream release, but until that is released, packaged and distributed for Fedora - it might be a good idea to add the patch to the current Samba build.
Comment 42 Tomáš Bžatek 2010-11-18 08:17:32 EST
Reassigning to samba to get the patch packaged.
Comment 43 Fedora Update System 2010-11-18 10:34:09 EST
samba-3.5.6-71.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/samba-3.5.6-71.fc13
Comment 44 Fedora Update System 2010-11-18 18:59:58 EST
samba-3.5.6-71.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update samba'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/samba-3.5.6-71.fc13
Comment 45 Fredrik Jönsson 2010-11-19 05:20:20 EST
Updated to the following packages and writing to windows share now works, thumbs up.

libsmbclient-3.5.6-71.fc13.x86_64
samba-3.5.6-71.fc13.x86_64
samba-common-3.5.6-71.fc13.x86_64
samba-client-3.5.6-71.fc13.x86_64
Comment 46 Nicholas Kudriavtsev 2010-11-19 10:58:22 EST
The update helps me also.
Comment 47 Joël Wijngaarde 2010-11-19 11:01:53 EST
This bug also exists of FC 14, could you please also push an update to the FC14 testing repo ?
Comment 48 Paul Howarth 2010-11-19 11:11:00 EST
There's https://admin.fedoraproject.org/updates/samba-3.5.6-70.fc14, which seems to be the latest F14 version. If so, the upgrade path from F13 to F14 is broken, since the F13 update is rpm-newer than the F14 one.
Comment 49 Nicholas Kudriavtsev 2010-11-19 12:19:46 EST
I've tested on F14, it was fine with 3.5.6-70.
Comment 50 Johnson Lai 2010-11-20 20:22:32 EST
Sorry, my windows share on my Fc13-64 is still isn't work. Still get "invalid argument", copying file at 48kb. 

What am i missing? I updated accordingly to the command at "comment 44" 

smbclient version (from command: smbclient --version)
Version 3.5.6-71.fc13

Do i need to also update nautilas?
Comment 51 Nicholas Kudriavtsev 2010-11-21 03:59:46 EST
(In reply to comment #50)
> What am i missing? I updated accordingly to the command at "comment 44" 
You are missing libsmbclient, probably.

Check up all samba client's packages:

libsmbclient-3.5.6-71.fc13.x86_64
samba-common-3.5.6-71.fc13.x86_64
samba-client-3.5.6-71.fc13.x86_64
Comment 52 Fedora Update System 2011-03-03 08:12:54 EST
Package samba-3.5.7-73.fc13:
* should fix your issue,
* was pushed to the Fedora 13 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing samba-3.5.7-73.fc13'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/samba-3.5.7-73.fc13
then log in and leave karma (feedback).
Comment 53 Fedora Update System 2011-03-11 07:44:01 EST
samba-3.5.8-74.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/samba-3.5.8-74.fc13
Comment 54 Fedora Update System 2011-03-19 06:26:59 EDT
samba-3.5.8-74.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.