Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using CentOS 5.5 with smbclient 3.0.33-3.28-el5 (latest version in repo), and I can't overwrite files in my Samba store.

I am not the admin for the Windows server that hosts the share, so there isn't anything I can do server side. But I do have write permission to the server. I know the server runs Windows XP or Server 2003; I don't know which.
I can delete the file, and then copy the new version over, but I can't overwrite it.

Using the cp command I'll get this error:

[jonescb@localhost ~]$ cp foo.txt /mnt/si_storage/foo.txt
cp: cannot create regular file `/mnt/si_storage/foo.txt': No such file or directory`

And if I edit a file on the server using vim, I can save it once, but if I save it again I get this:
"/mnt/si_storage/foo.txt" E212: Can't open file for writing

This is my /etc/fstab entry for the samba server:
//192.168.1.2/SI_STORAGE /mnt/si_storage cifs username=myuser,password=mypass 0 0

Edit: I can overwrite files just fine on my XP machine. The CentOS box is the only one having problems.

share|improve this question
    
Reading this makes me very confused. A Windows XP or 2003 system is running Samba? Do you mean SMB services (Windows Share)? Just where does "my Samba store" exist, on Windows or CentOS? Is your CentOS system trying to mount its own Samba share? –  kmarsh Jun 10 '10 at 17:05
    
Yes, it's a Windows Share. I just have the habit of calling it Samba. The CentOS box doesn't host any SMB shares, it's only mounting one from a Windows server. –  jonescb Jun 10 '10 at 17:23
add comment

1 Answer

up vote 0 down vote accepted

Solved this by adding nodfs to the mount options. I found it here http://www.zeitoun.net/articles/dsn323-samba-dfs-bug/start.

It says that nodfs was added in linux 2.6.28, but it looks like Red Hat backported it to their 2.6.18 kernel.

share|improve this answer
    
Or that RedHat invented it. –  harrymc Nov 15 '10 at 14:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.