Bug 6123 - mount.smbfs - wrong ctime,mtime for new files
Summary: mount.smbfs - wrong ctime,mtime for new files
Status: RESOLVED DUPLICATE of bug 1920
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.24
Hardware: PPC Linux
: P3 minor
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 21:59 UTC by Abraham Alawi
Modified: 2009-02-19 09:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abraham Alawi 2009-02-18 21:59:45 UTC
I know it's unmaintained but FYI! mount.smbfs doesn't set the {c,m}time correctly for new files on the Samba mounted share on PPC platform, while the same version of the application behaves as expected on Intel platform. mount.cifs seems to be buggy on PPC as well, it doesn't enforce the "uid=" option that's why we are using mount.smbfs. Anyway, consider the following scenario: 


## System time which is the same as the Samba server and both are using NTP
aalawi@host1:/mnt/smbfs$ date 
Thu Feb 19 16:38:09 NZDT 2009

## Incorrect timing for the files on the shares
aalawi@host1:/mnt/smbfs$ touch test1 ; touch /tmp/test1 ; stat test1 ; stat /tmp/test1
  File: `test1'
  Size: 0         	Blocks: 0          IO Block: 1024   regular empty file
Device: 17h/23d	Inode: 1276        Links: 1
Access: (0700/-rwx------)  Uid: (339510/ aalawi)   Gid: (62215/     all)
Access: 2009-02-19 03:51:42.000000000 +1300
Modify: 2009-02-19 03:51:42.000000000 +1300
Change: 2009-02-19 03:51:42.000000000 +1300
  File: `/tmp/test1'
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: 821h/2081d	Inode: 48870       Links: 1
Access: (0644/-rw-r--r--)  Uid: (339510/ aalawi)   Gid: (62215/     all)
Access: 2009-02-19 16:38:43.000000000 +1300
Modify: 2009-02-19 16:38:43.000000000 +1300
Change: 2009-02-19 16:38:43.000000000 +1300


## Ironically, the time is correct for fractions of seconds 
aalawi@host1:/mnt/smbfs$ echo hi > test1 ; echo hi > /tmp/test1 ; stat test1 ; stat /tmp/test1
  File: `test1'
  Size: 3         	Blocks: 0          IO Block: 1024   regular file
Device: 17h/23d	Inode: 1276        Links: 1
Access: (0700/-rwx------)  Uid: (339510/ aalawi)   Gid: (62215/     all)
Access: 2009-02-19 16:41:22.000000000 +1300
Modify: 2009-02-19 16:41:22.000000000 +1300
Change: 2009-02-19 16:41:23.467496514 +1300
  File: `/tmp/test1'
  Size: 3         	Blocks: 8          IO Block: 4096   regular file
Device: 821h/2081d	Inode: 48870       Links: 1
Access: (0644/-rw-r--r--)  Uid: (339510/ aalawi)   Gid: (62215/     all)
Access: 2009-02-19 16:38:43.000000000 +1300
Modify: 2009-02-19 16:41:23.000000000 +1300
Change: 2009-02-19 16:41:23.000000000 +1300


## Back to odd timing 
aalawi@host1:/mnt/smbfs$ stat test1 ; stat /tmp/test1
  File: `test1'
  Size: 3         	Blocks: 1          IO Block: 1024   regular file
Device: 17h/23d	Inode: 1276        Links: 1
Access: (0700/-rwx------)  Uid: (339510/ aalawi)   Gid: (62215/     all)
Access: 2009-02-19 03:54:22.000000000 +1300
Modify: 2009-02-19 03:54:22.000000000 +1300
Change: 2009-02-19 03:54:22.000000000 +1300
  File: `/tmp/test1'
  Size: 3         	Blocks: 8          IO Block: 4096   regular file
Device: 821h/2081d	Inode: 48870       Links: 1
Access: (0644/-rw-r--r--)  Uid: (339510/ aalawi)   Gid: (62215/     all)
Access: 2009-02-19 16:38:43.000000000 +1300
Modify: 2009-02-19 16:41:23.000000000 +1300
Change: 2009-02-19 16:41:23.000000000 +1300


+++++++++++++++++++++++++++++++
dpkg --status smbfs
Package: smbfs
Status: install ok installed
Priority: optional
Section: otherosfs
Installed-Size: 1128
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: powerpc
Source: samba
Version: 3.0.24-2ubuntu1.7
Replaces: smbfsx
Depends: netbase (>= 2.02), samba-common (= 3.0.24-2ubuntu1.7), libc6 (>= 2.5-0ubuntu1), libcomerr2 (>= 1.33-3), libkrb53 (>= 1.4.2), libldap2 (>= 2.1.17-1)
Suggests: smbclient
Conflicts: smbfsx, suidmanager (<< 0.50)
Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x)
 Smbfs is a filesystem which understands the SMB/CIFS protocol.
 This is the protocol Windows for Workgroups, Windows NT or
 LAN Manager use to talk to each other. It was inspired by
 samba, the program by Andrew Tridgell that turns any unix
 site into a file server for DOS or Windows clients.
 .
 If you want to use command-line utilities like smbclient, smbtar
 and/or smbspool you just need to install the smbclient package.
Original-Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>

+++++++++++++++++++++++++++++++
modinfo smbfs
filename:       /lib/modules/2.6.20-16-powerpc64-smp/kernel/fs/smbfs/smbfs.ko
license:        GPL
srcversion:     80195D6295A3BBE216C923F
depends:        
vermagic:       2.6.20-16-powerpc64-smp SMP mod_unload 

+++++++++++++++++++++++++++++++
## The Samba server
aalawi@server1$ dpkg --status samba
Package: samba
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 7788
Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Architecture: i386
Version: 3.0.24-6etch10
Replaces: samba-common (<= 2.0.5a-2)
Depends: samba-common (= 3.0.24-6etch10), netbase, logrotate, libacl1 (>= 2.2.11-1), libattr1 (>= 2.4.4-1), libc6 (>= 2.3.6-6), libcomerr2 (>= 1.33-3), libcupsys2 (>= 1.2.7), libgnutls13 (>= 1.4.0-0), libkrb53 (>= 1.4.2), libldap2 (>= 2.1.17-1), libpam0g (>= 0.76), libpopt0 (>= 1.10), zlib1g (>= 1:1.2.1), debconf (>= 0.5) | debconf-2.0, libpam-runtime (>= 0.76-13.1), libpam-modules, lsb-base (>= 3.0-6), procps
Recommends: smbldap-tools
Conffiles:
 /etc/init.d/samba c1f713f257dcefd197b31649341fa81c
 /etc/logrotate.d/samba 8a76a272b6f25ef0aebd19ac6568aded
 /etc/cron.daily/samba f6519535df7964f95cdd7db501bf3ad2
Description: a LanManager-like file and printer server for Unix
 The Samba software suite is a collection of programs that
 implements the SMB/CIFS protocol for unix systems, allowing you to serve
 files and printers to Windows, NT, OS/2 and DOS clients. This protocol
 is sometimes also referred to as the LanManager or NetBIOS protocol.
 .
 This package contains all the components necessary to turn your Debian GNU/Linux box into a powerful file and printer server.
 . Currently, the Samba Debian packages consist of the following:
 .
  samba - LanManager-like file and printer server for Unix.
  samba-common - Samba common files used by both the server and the client.
  smbclient - LanManager-like simple client for Unix.
  swat - Samba Web Administration Tool
  samba-doc - Samba documentation.
  samba-doc-pdf - Samba documentation in PDF format.
  smbfs - Mount and umount commands for the smbfs (kernels 2.2.x and above).
  libpam-smbpass - pluggable authentication module for SMB/CIFS password database
  libsmbclient - Shared library that allows applications to talk to SMB/CIFS servers
  libsmbclient-dev - libsmbclient shared libraries
  winbind: Service to resolve user and group information from Windows NT servers
  python-samba: Python bindings that allow access to various aspects of Samba
 .
 It is possible to install a subset of these packages depending on
 your particular needs. For example, to access other SMB/CIFS servers you
 should only need the smbclient and samba-common packages.
 .
 http://www.samba.org/


+++++++++++++++++++++++++++++++
Thanks in advance
Comment 1 Björn Jacke 2009-02-19 09:40:22 UTC

*** This bug has been marked as a duplicate of 1920 ***