emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48106: closed (bug: touch utility does not handle file create error


From: GNU bug Tracking System
Subject: bug#48106: closed (bug: touch utility does not handle file create error properly)
Date: Sat, 01 May 2021 22:49:02 +0000

Your message dated Sat, 1 May 2021 15:48:43 -0700
with message-id <d45a7b62-465a-ee67-a4a6-1440ba2fbdf7@cs.ucla.edu>
and subject line Re: bug#48106: bug: touch utility does not handle file create 
error properly
has caused the debbugs.gnu.org bug report #48106,
regarding bug: touch utility does not handle file create error properly
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48106: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48106
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: bug: touch utility does not handle file create error properly Date: Thu, 29 Apr 2021 20:23:47 +0200 User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.9.1
hello,

touch utility telling weird error on file creation on a immutable/ro dir.

apparently, it does not catch/report the first error (EPERM) but only
the second one (ENOENT), when trying to set the time on the non-existing
file.

regards
roland kletzing
sysadmin

root@s900:/tmp# mkdir /tmp/test
root@s900:/tmp# chown 0400 /tmp/test/
root@s900:/tmp# chattr +i /tmp/test
root@s900:/tmp# touch /tmp/test/testfile
touch: setting times of '/tmp/test/testfile': No such file or directory

root@s900:/tmp# strace touch /tmp/test/testfile 2>&1 |grep -i test
execve("/usr/bin/touch", ["touch", "/tmp/test/testfile"], 0x7ffe690abb88
/* 19 vars */) = 0
openat(AT_FDCWD, "/tmp/test/testfile",
O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EPERM (Operation not
permitted)
utimensat(AT_FDCWD, "/tmp/test/testfile", NULL, 0) = -1 ENOENT (No such
file or directory)
write(2, "setting times of '/tmp/test/test"..., 37setting times of
'/tmp/test/testfile') = 37

# touch  --version
touch (GNU coreutils) 8.30

(on debian 10.9)




--- End Message ---
--- Begin Message --- Subject: Re: bug#48106: bug: touch utility does not handle file create error properly Date: Sat, 1 May 2021 15:48:43 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
Thanks for reporting the problem. I installed the attached to fix it.

Attachment: 0001-touch-fix-wrong-diagnostic-Bug-48106.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]