Invalid argument

I get a dialog box that says “There was an error copying the file” with “Invalid Argument” when I click more details when I try to access files on windows machine of my Samba Network.

No takers, must be a thorny one. Here’s some questions to get some more background for the cruisers-by to think about your problem:

Do you get to copy the file despite the error message?
Also what is windows, vista or xp or?
Also, do you have third party firewall on windows?
Do you have passgae through Suse firewall for Samba?

I was wondering which machine you are copying to and from.

that will help me a bit…

A 0 bit file with the same name appeared on my openSUSE machine. It was windows me with xp home networking installed, no firewall. I do have a samba opening in openSUSE firewall.

I was copying from windows to openSUSE. I have another machine on the network running Mandriva 2008 and can copy to and from both openSUSE and windows using samba.

There would maybe be a clue in the Samba config file located at /etc/samba/smb.conf. can you post the contents here? And it occurs that if Mandriva can do it, what’s different one wonders, so could you post that smb.conf for comparison. Takes much space, maybe as attachments.

I couldn’t figure out how to attach this:
[global]
netbios name = opensuse
workgroup = TUX-NET
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = C:
usershare allow guests = Yes
map to guest = Bad User
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False
usershare path = /var/lib/samba/usershares

[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
share modes = no
locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
share modes = no
locking = no

[profiles]
comment = User Profiles
path = /var/samba/profiles
read only = no
available = yes
browseable = no
writable = yes
guest ok = no
public = no
printable = no
locking = no
create mode = 0600
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
share modes = no
locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
browseable = yes
writeable = yes
guest ok = yes

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gadmin-samba-pdf %s %u

Euripides wrote:

>
> I couldn’t figure out how to attach this:
> [global]
> netbios name = opensuse
> workgroup = TUX-NET
> printing = cups
> printcap name = cups
> printcap cache time = 750
> cups options = raw
> map to guest = Bad User
> include = /etc/samba/dhcp.conf
> logon path = \%L\profiles.msprofile
> logon home = \%L%U.9xprofile
> logon drive = C:
> usershare allow guests = Yes
> map to guest = Bad User
> usershare allow guests = Yes
> usershare max shares = 100
> usershare owner only = False
> usershare path = /var/lib/samba/usershares
>
> [homes]
> comment = Home Directories
> path = /home
> read only = no
> available = yes
> browseable = yes
> writable = yes
> guest ok = no
> public = no
> printable = no
> share modes = no
> locking = no
>
> [netlogon]
> comment = Network Logon Service
> path = /home/netlogon
> read only = no
> available = yes
> browseable = yes
> writable = no
> guest ok = no
> public = no
> printable = no
> share modes = no
> locking = no
>
> [profiles]
> comment = User Profiles
> path = /var/samba/profiles
> read only = no
> available = yes
> browseable = no
> writable = yes
> guest ok = no
> public = no
> printable = no
> locking = no
> create mode = 0600
> directory mask = 0700
>
> [printers]
> comment = All Printers
> path = /var/spool/samba
> browseable = yes
> writable = no
> guest ok = no
> public = no
> printable = yes
> share modes = no
> locking = no
>
> [pdf-documents]
> path = /home/pdf-documents
> comment = Converted PDF Documents
> available = yes
> browseable = yes
> writeable = yes
> guest ok = yes
>
> [pdf-printer]
> path = /tmp
> comment = PDF Printer Service
> printable = yes
> guest ok = yes
> use client driver = yes
> printing = bsd
> print command = /usr/bin/gadmin-samba-pdf %s %u
>
>
Euripides;

I assume you are copying to the home share. [homes] is a special Samba
share and would normally not require a path. Try this:
[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = No

Make sure to add the users to both linux and samba (useradd, smbpasswd). I
would suggest you use testparm on your smb.conf. I think it will reveal
some of your trouble.


P. V.

Regarding testparm: Testparm says all is ok except a caution on netbios name lengths that’s only relevant for legacy windows distros.

Your problem is with accessing windows shares completely. The win computers usually have workgroup names different from tux-net, like “mshome” or “workgroup”. Are your workgroup names the same on all machines? That would cause a problem if different.

Also in windows check the shares are marked to non-restrictive permissions.