Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!romp!auschs!awdprime!greenber.austin.ibm.com!jfh From: jfh@greenber.austin.ibm.com (John F Haugh II) Newsgroups: comp.bugs.sys5 Subject: Re: touch: got to be owner if use date string Message-ID: <5283@awdprime.UUCP> Date: 12 Feb 91 18:21:52 GMT References: Sender: news@awdprime.UUCP Organization: Obfuscated Features "R" Us, LCC Austin Lines: 28 In article Dan_Jacobson@ATT.COM writes: >spotted on Amdahl UTS 5.2.6.... > >$ ls -l lcircle10.300pk >-rw-rw-rw- 1 dvorak dvorak 4340 Feb 12 07:51 lcircle10.300pk >$ id >uid=47941(danj1) gid=47941(danj1) fsid=8(45262) >$ touch lcircle10.300pk >#that worked, why not this? works when I'm owner... >$ touch 1231235999 lcircle10.300pk >touch: cannot change times on lcircle10.300pk Not sure which part should be the bug. In the olden days, touch without an argument read and wrote the first byte of the file. That was sufficient to change the file modification time. Nowadays, touch takes a date and uses the utime(2) system call to change the last read or written dates. This calls requires the user to be the file owner or root. The initial question I raised concerns whether the "old style" behavior should still work. I think the answer is "why not." -- John F. Haugh II | I've Been Moved | MaBellNet: (512) 838-4340 SneakerNet: 809/1D064 | AGAIN ! | VNET: LCCB386 at AUSVMQ BangNet: ..!cs.utexas.edu!ibmchs!auschs!snowball.austin.ibm.com!jfh (e-i-e-i-o)