Date: Wed, 28 Dec 2005 22:53:53 +0100 From: "Martin P. Hansen" <mph@lima.dyndns.dk> To: freebsd-questions@freebsd.org Subject: Re: Preserve date when cp over smbfs Message-ID: <20051228215353.GA8743@echobase.hoth.dk> In-Reply-To: <20051228112558.GA79302@bsdmon.com> References: <20051228112558.GA79302@bsdmon.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051228215353.GA8743>
