From owner-freebsd-questions@FreeBSD.ORG Wed Dec 28 11:45:53 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC4F816A41F for ; Wed, 28 Dec 2005 11:45:53 +0000 (GMT) (envelope-from hika@bsdmon.com) Received: from smtp.bsdmon.com (hosting-28.42.rev.fr.colt.net [213.41.42.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26B2B43D5A for ; Wed, 28 Dec 2005 11:45:52 +0000 (GMT) (envelope-from hika@bsdmon.com) Received: from localhost (localhost [127.0.0.1]) by smtp.bsdmon.com (Postfix) with ESMTP id 0BAB537608B for ; Wed, 28 Dec 2005 12:45:51 +0100 (CET) Received: from smtp.bsdmon.com ([127.0.0.1]) by localhost (freefugu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 39903-03 for ; Wed, 28 Dec 2005 12:45:18 +0100 (CET) Received: from mail.bsdmon.com (14.128.101-84.rev.gaoland.net [84.101.128.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.bsdmon.com (Postfix) with ESMTP id 86ADB375834 for ; Wed, 28 Dec 2005 12:26:00 +0100 (CET) Received: by sdf1.bsdmon.com (Postfix, from userid 1001) id 1DDD2B853; Wed, 28 Dec 2005 12:25:58 +0100 (CET) Date: Wed, 28 Dec 2005 12:25:58 +0100 From: Gilbert Cao To: freebsd-questions@freebsd.org Message-ID: <20051228112558.GA79302@bsdmon.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline X-Operating-System: FreeBSD 6.0-STABLE i386 Organization: BSDMon X-GPG-Key: http://www.bsdmon.com/public_key.gpg User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at bsdmon.com Subject: Preserve date when cp over smbfs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2005 11:45:54 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, the list. I have noticed some small problem when copying files over SMB. My samba server (port version 3.0.8,1) is running on a FreeBSD 5.4 STABLE. My samba client is running on a FreeBSD 6.0 STABLE. When I copy a single file with the cp utility, with -p flag, to a smbfs mounted directory, the modification datetime is not preserved and it is set to the current datetime : $ cp -p myfile /path/to/smbmountdir/ The same thing occurred with the tar utility : $ tar cpf - myfile | tar xpvf - -C /path/to/smbmountdir/ However, I have tried to copy the same file to the same smbfs mounted directory, with gqview (port version 2.0.1_1) and the modification datetime= is preserved. I have quickly looked into the source code of both cp and gqview, and it se= ems that cp relies on utimes(), and gqview relies on utime(). Is there any other way for the cp and tar utilities to preserve file datetime over SMB ? In the problem comes from the smbfs kernel module ? or the cp and tar utility ? In the future, I would just like to avoid loading gqview, just to copy files with preserve datetime : cp and tar seems more natural :p Regards. --=20 -------------------------------- (hika) Gilbert Cao http://www.miaouirc.com - MiaouIRC Project 2002-2003 http://www.bsdmon.com - The BSD DMON Power to serve IRC : #miaule at IRCNET Network -------------------------------- --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDsnZGSyQfFTqAEpcRAj+SAJ48oy88trP35utqpGO98LwFB++mdACeLVnF GCwV8g9u8TvR+Sk1TIqFrVo= =WiJI -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--