Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1 From: Dan_Jacobson@ATT.COM Newsgroups: comp.bugs.sys5 Subject: Re: touch: got to be owner if use date string Message-ID: Date: 13 Feb 91 23:37:05 GMT References: <1991Feb12.213024.15634@i88.isc.com> Sender: danj1@cbnewse.att.com (Dan Jacobson) Reply-To: Dan_Jacobson@ATT.COM Organization: AT&T-BL, Naperville IL, USA Lines: 22 In-Reply-To: jeq@i88.isc.com's message of 12 Feb 91 21:30:24 GMT >>>>> On 12 Feb 91 21:30:24 GMT, jeq@i88.isc.com (Jonathan E. Quist) said: J> touch() calls utime(file,0) to set the current time. J> to set a particular time, it calls utime(file,&utimbuf), J> with the contents of utimbuf set to the desired time. J> The first requires only write permission; the second J> requires ownership. (ref. utime(2)) OK, fine, than the touch man page should say BUGS The optional timestring doesn't work if you don't own the file, even though you can write to it. In that case consider copying the file, touching it to the preferred date, moving it to the original file name, if possible, then chown(1) and chgrp(1)ing the file to the original owner. [I haven't considered any of the options letters.] [Also thanks to Sam Ho] -- Dan_Jacobson@ATT.COM Naperville IL USA +1 708-979-6364