Samba file timestamp policy with Linux client .vs. Windows client

Discussion in 'Linux Networking' started by Richard Conway, Mar 2, 2004.

  1. I am experiencing a difference in file timestamp behaviour between a Linux
    and Windows client accessing a SMB share hosted on a Windows 2003 Server
    platform.

    Files accessed by the Linux client are left with Modified and Accessed times
    based upon the time on the client. Files accessed by the Windows client
    (also running Windows 2003 Server) are left with Modified and Accessed times
    based upon the time on the *server*. This is causing problems for me as I
    have an application running on the server which uses these timestamps to
    detect the presence of new or modified files - sometimes file updates are
    missed when the update occurs from the Linux client if the system time on
    the Linux client is behind that of the server.

    Does anyone know if I can configure the SMB client running on the Linux
    platform to behave the same as the Windows 2003 SMB client, i.e. I want my
    timestamps to be set according to the current time on the server as opposed
    to the client.

    Thanks,
    Richard.
     
    Richard Conway, Mar 2, 2004
    #1
    1. Advertisements

  2. NET TIME?
     
    John L. Cunningham, Mar 4, 2004
    #2
    1. Advertisements

  3. Richard Conway

    Villy Kruse Guest


    SMB file systems expects time stamp in local time. Therefore the linux
    kernel needs to know the UTC to localtime offset to translate unix
    time to localtime. This doesn't occur automatically, but setting the
    timezone information in a call to settimeofdat() would do it (at least on
    kernel 2.2). Remember that the unix and linux kernel does not otherwise
    use localtime for anything so failing to set the timezone in the kernel
    doesn't affect anything except SMB and VFAT file systems time stamps.


    Villy
     
    Villy Kruse, Mar 5, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.