# Samba CIFS file "changed on disk" [solved]

## eddymulyono

I'm having a problem updating file in my CIFS-mounted partition.

Steps to reproduce:

Open a text editor (e.g. gedit or emacs)

Enter some text ("test")

Save ("test.txt")

Enter some more text ("test again")

Save

Expected:

"test.txt" updated

Problem:

gedit: "The file /home/eddy/test.txt has been modified since reading it. If you save it, all the external changes could be lost. Save it anyway? Save Anyway. Don't Save."

emacs: "test.txt changed on disk; really edit the buffer? (y, n, r or C-h)"

Workaround:

gedit: Click "Save Anyway".

emacs: Type 'y'.

This happens every time I update the file.

My samba server:

```

# emerge -pv samba

[ebuild   R   ] net-fs/samba-3.0.22-r3  USE="async cups pam python readline swat xml -acl -automount -doc -examples -kerberos -ldap -ldapsam -libclamav -mysql -oav -postgres -quotas -syslog -winbind" 0 kB

/etc/samba/smb.conf:

[global]

hosts deny = 0.0.0.0/0

hosts allow = 10.0.0.0/24, 127.0.0.1

[eddy]

path = /mnt/gudang/eddy

valid users = eddy

browseable = no

writeable = yes

map archive = no

```

My samba client:

```

# emerge -pv samba

[ebuild   R   ] net-fs/samba-3.0.23a  USE="cups pam python readline -acl -async -automount -doc -examples -kerberos -ldap -oav -quotas (-selinux) -swat -syslog -winbind" LINGUAS="-ja -pl" 0 kB

/etc/fstab:

//theoden/eddy          /home/eddy      cifs            defaults,cred=/etc/samba/eddy_cred.txt  0 0

$ mount:

//theoden/eddy on /home/eddy type cifs (rw,mand)

```

Any suggestions?Last edited by eddymulyono on Sun Sep 10, 2006 7:25 am; edited 1 time in total

----------

## eddymulyono

Apparently, it's caused by a time-synchronization problem. I fixed it by running /etc/init.d/ntpd on both client and server.

```

eselect rc start ntp-client ntpd

```

----------

