Re: Some odd behaviour.

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Tue, 19 Jan 2010 16:46:31 +0100
Stef Bon <[email protected]> wrote:

> Hello,
> 
> I'm using mount.cifs 1.12-3.4.3, where share is on a Linux samba
> server (samba 3.4.4).
> 
> The share I'm connecting looks like:
> 
> [public]
>         comment = Diverse publieke bestanden.
>         path = /home/gast
>         guest ok = Yes
>         guest only = no
>         use sendfile = no
>         hide special files = Yes
>         map archive = No
>         fake oplocks = no
>         read only = No
> 
> The share is owned by gast, but groupmembers have access. The user
> gast is also the guest user. (gast is dutch for guest)
> On the server:
> ls -l /home/gast
> 
> root [ /etc/samba ]#  ls -al /home/gast
> total 12
> drwxrwxr-x 2 gast netgroup 4096 2010-01-19 16:15 .
> drwxr-xr-x 4 root root     4096 2008-06-19 19:46 ..
> -rw-r--r-- 1 sbon netgroup   35 2010-01-19 16:29 testfile
> 
> Futher, server is on share modus, but for some shares credentials are required.
> 
> On the client:
> I' mounted the share with mount.cifs using the credentials:
> 
> Jan 19 16:19:15 clfs20091030 : Mounting with options
> credentialsfile=/home/gast/.smb/mount.cred,uid=1000,gid=1000,file_mode=0644,dir_mode=0755,ip=192.168.0.2.
> 
> where the credentials are of the user sbon, and the uid 1000 and gid
> 1000 belong to user gast.
> The gast user on the client is no way connected to the user gast on
> the server (no LDAP or Winbind).
> 
> Now, the share is mounted at:
> 
> /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d
> 
> gast [ /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d ]$ ls -al
> total 4
> drwxrwxr-x 2 gast users  0 2010-01-19 16:15 .
> drwxr-xr-x 3 root root   0 2010-01-19 16:19 ..
> -rw-r--r-- 1 gast users 35 2010-01-19 16:29 testfile
> 
> Obvious the owner is set to the local user gast, but permissions
> remain the same.
> Now when I do:
> 
> gast [ /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d
> ]$ echo 100 > testfile
> gast [ /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d
> ]$ cat testfile
> 100
> 
> To be expected, but now again:
> 
> gast [ /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d
> ]$ echo 101 >> testfile
> gast [ /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d
> ]$ cat testfile
> 100
> 100
> 101
> 
> 
> Huuh??
> What happens here?? This continues when I do echo 102 and so on...
> Everytime the contents is copied, and the new line is added.
> 
> gast [ /mnt/mount.md5key/gast/mount/1e1a98d23e3d45ecc665631b7d97508d ]$ ls -al
> total 4
> drwxrwxr-x 2 gast users  0 2010-01-19 16:15 .
> drwxr-xr-x 3 root root   0 2010-01-19 16:19 ..
> -rw-r--r-- 1 gast users 12 2010-01-19 16:41 testfile
> 
> Somebody reckognizes this behaviour?
> 
> Stef Bon
> 
> PS OpLockEnabled is set to yes (1), MultiUserMount is 0, LookupCacheEnabled is 1
> _______________________________________________
> linux-cifs-client mailing list
> [email protected]
> https://lists.samba.org/mailman/listinfo/linux-cifs-client
> 

Known bug. You need this commit in your kernel:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=cea62343956c24452700c06cf028b72414c58a74

-- 
Jeff Layton <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.