From owner-freebsd-questions@FreeBSD.ORG Wed Dec 28 21:53:57 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 34CA416A41F for ; Wed, 28 Dec 2005 21:53:57 +0000 (GMT) (envelope-from mph@echobase.hoth.dk) Received: from pfepc.post.tele.dk (pfepc.post.tele.dk [195.41.46.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBC8C43D62 for ; Wed, 28 Dec 2005 21:53:55 +0000 (GMT) (envelope-from mph@echobase.hoth.dk) Received: from echobase.hoth.dk (echobase.hoth.dk [80.62.210.27]) by pfepc.post.tele.dk (Postfix) with ESMTP id 71D5D262814 for ; Wed, 28 Dec 2005 22:53:54 +0100 (CET) Received: by echobase.hoth.dk (Postfix, from userid 1001) id 0647417BEA; Wed, 28 Dec 2005 22:53:53 +0100 (CET) Date: Wed, 28 Dec 2005 22:53:53 +0100 From: "Martin P. Hansen" To: freebsd-questions@freebsd.org Message-ID: <20051228215353.GA8743@echobase.hoth.dk> Mail-Followup-To: freebsd-questions@freebsd.org References: <20051228112558.GA79302@bsdmon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051228112558.GA79302@bsdmon.com> User-Agent: Mutt/1.4.2.1i Subject: Re: 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 21:53:57 -0000 On Wed, 28 Dec 2005, Gilbert Cao wrote: > 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 : I've had this problem too, cp was also emitting a warning about utimes: mph# mount -t smbfs -o-Eiso8859-1:cp850,-f660 //mph@light/e$ /mnt mph% cp -p INFO /mnt cp: utimes: /mnt/INFO: Operation not permitted This was because I wasn't ``owner'' of the files. Adding the -u flag fixed this. mph# mount -t smbfs -o-Eiso8859-1:cp850,-f660,-umph //mph@light/e$ /mnt Now my modification time is preserved. -- Martin P. Hansen | () ASCII Ribbon Campaign | /\ Against HTML Email!