From: Han Holl Date: 2006-10-11T17:37:05+09:00 Subject: FileUtils.touch not consistent with system('touch') Hi, I have a world-writable file, not owned by me, that I try to touch: -rwxrwxrwx 1 root root 0 Oct 11 10:29 /tmp/file ruby -rfileutils -e 'FileUtils.touch("/tmp/file")' /usr/lib/ruby/1.8/fileutils.rb:1014:in `utime': Operation not permitted - /tmp/file (Errno::EPERM) from /usr/lib/ruby/1.8/fileutils.rb:1014:in `touch' from /usr/lib/ruby/1.8/fileutils.rb:1012:in `touch' from -e:1 but: ruby -e 'system("touch /tmp/file")' succeeds. The reason is that File.utime cannot be called with a NULL argument. Linux (and I assume this is Posix) allows a utime call with NULL if the file is writeable, but to change the time a process must have special privileges. With the current File.utime FileUtils cannot implement this. Cheers, Han Holl