From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041003 Firefox/0.10 Description of problem: When I redirect output to a location where I would expect to get "permission denied", I instead get "No such file or directory". Version-Release number of selected component (if applicable): bash-3.0-19.2 How reproducible: Always Steps to Reproduce: 1. log in as a user that can't write to / 2. run the command ">/tempfile" Actual Results: The shell returns the error "-bash: /tempfile: No such file or directory" Expected Results: The shell should have returned the error "bash: /tempfile: Permission denied" (This is the Red Hat Enterprise 3 behavior.) Additional info: An "strace" of the improper behavior (strace sh -c ">/tempfile") shows: ----- open("/tempfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES (Permission denied) open("/tempfile", O_WRONLY|O_TRUNC|O_LARGEFILE) = -1 ENOENT (No such file or directory) ----- It seems that the failure of the first open() is not being detected and the errno from the second open() without O_CREAT is the one getting passed back to the error handler. In Red Hat Enterprise 3, there is only one open(): ----- open("/tempfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES (Permission denied) -----
This was caused by AFS support. A fix has been committed to CVS for Fedora development. Thanks for the report.