Date: Thu, 1 Jun 2000 15:38:59 -0400 From: Randall Hopper <aa8vb@nc.rr.com> To: andrew@ugh.net.au Cc: stable@freebsd.org Subject: Re: cp fails to do utimes() (??) Message-ID: <20000601153859.A1062@nc.rr.com> In-Reply-To: <Pine.BSF.4.21.0006011553240.24824-100000@starbug.ugh.net.au>; from andrew@ugh.net.au on Thu, Jun 01, 2000 at 03:59:52PM %2B1000 References: <Pine.BSF.4.21.0006011553240.24824-100000@starbug.ugh.net.au> <Pine.BSF.4.21.0006011606040.24824-100000@starbug.ugh.net.au> <20000531160040.A1299@nc.rr.com> <Pine.BSF.4.21.0006011553240.24824-100000@starbug.ugh.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
andrew@ugh.net.au: |> I can write the file as either user, but in the non-root case the resulting |> file modification time is wrong. | | You can only use utimes if you are root or you own or have write |permission on the file. You aren't root so do you own or have write |permisison to the new file? FAT doesn't support ownership so what does the |owner default to - it may not be you? What permisions are on the file when |utimes is called? ... |Oops...thats only if you are trying to set access and modification times |and I would guess cp isn't so ignore me. No, you're right on! cp -p says to transfer the modification time, ownership, and other attributes from the source file to the dest file. I didn't know about the ownership loophole you mentioned. Searching the mount_msdos page, I found the fstab magic I needed to force ownership for FAT. It's not pretty but it works. /dev/fd0 /a msdos rw,-m777,noauto,-u1234 0 0 /dev/fd1 /b msdos rw,-m777,noauto,-u1234 0 0 /dev/wd0s1 /c msdos rw,-m777,-u1234 0 0 /dev/wd1s1 /d msdos rw,-m777,-u1234 0 0 /dev/wd2s1 /e msdos rw,-m777,-u1234 0 0 /dev/wd0s5 /f msdos rw,-m777,-u1234 0 0 /dev/wd1s5 /g msdos ro,-m555,-u1234 0 0 /dev/wd1s6 /h msdos ro,-m555,-u1234 0 0 cp -p now doesn't complain about either chown or utimes. Thanks for the help, Randall -- Randall Hopper aa8vb@nc.rr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000601153859.A1062>
