Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Dec 2005 23:37:44 +0100
From:      Gilbert Cao <hika@bsdmon.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Preserve date when cp over smbfs
Message-ID:  <20051228223743.GA1075@bsdmon.com>
In-Reply-To: <20051228215353.GA8743@echobase.hoth.dk>
References:  <20051228112558.GA79302@bsdmon.com> <20051228215353.GA8743@echobase.hoth.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Wed, Dec 28, 2005 at 10:53:53PM +0100, Martin P. Hansen wrote:
> 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 a=
nd it
> > is set to the current datetime :
>=20
> I've had this problem too, cp was also emitting a warning about utimes:
>=20
> 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

I don't have this warning when copying files.
All my mount directories are owned by my current (the one who does the
copy)

>=20
> This was because I wasn't ``owner'' of the files. Adding the -u flag fixe=
d this.

so, according to the mount_smbfs(8), the -u flag is not needed in my
case.

>=20
> mph# mount -t smbfs -o-Eiso8859-1:cp850,-f660,-umph //mph@light/e$ /mnt
>=20
> Now my modification time is preserved.

The problem still persists in my case :
My samba server is a FreeBSD machine (//mph@light/e$ <- I guess it is a
Windows machine)

But I still don't know why modification time is preserved when copying
with gqview ...

--=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
--------------------------------

--FL5UXtIhxfXey3p5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDsxO3SyQfFTqAEpcRAln1AKCIma0fWquWnZRgkY8tsxWIiJ3cDQCglj83
S+6GccqT3HgXi/3OX8PHPYA=
=DhAO
-----END PGP SIGNATURE-----

--FL5UXtIhxfXey3p5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051228223743.GA1075>