Roland Mainz
2013-08-21 01:14:21 UTC
Hi!
----
While testing the fix for Irek's problem in
http://lists.research.att.com/pipermail/ast-developers/2013q3/003205.html
I hit the issue that ast-ksh.2013-08-24's rm(1) builtin (on both SuSE
12.3/AMD64/64bit and Solaris 11/AMD64/64bit) doesn't print any error
messages (it returns a non-zero exit code... but there is no message
on stderr) if it can't remove a directory because it's not readable...
Example:
-- snip --
$ ksh -x -c 'builtin rm ; ls -l chicken ; mkdir chicken ; mkdir
chicken/foo ; chmod a-r chicken ; rm -Rf chicken ; print "rm=$?" ; ls
-la'
+ builtin rm
+ ls -l chicken
ls: cannot access chicken: No such file or directory
+ mkdir chicken
+ mkdir chicken/foo
+ chmod a-r chicken
+ rm -Rf chicken
+ print rm=1
rm=1
+ ls -la
total 12
drwxr-xr-x 3 test001 users 4096 Aug 21 03:09 .
drwxr-xr-x 9 test001 users 4096 Aug 21 03:07 ..
d-wx--x--x 3 test001 users 4096 Aug 21 03:09 chicken
-- snip --
AFAIK I would expect an error message in this case...
----
Bye,
Roland
----
While testing the fix for Irek's problem in
http://lists.research.att.com/pipermail/ast-developers/2013q3/003205.html
I hit the issue that ast-ksh.2013-08-24's rm(1) builtin (on both SuSE
12.3/AMD64/64bit and Solaris 11/AMD64/64bit) doesn't print any error
messages (it returns a non-zero exit code... but there is no message
on stderr) if it can't remove a directory because it's not readable...
Example:
-- snip --
$ ksh -x -c 'builtin rm ; ls -l chicken ; mkdir chicken ; mkdir
chicken/foo ; chmod a-r chicken ; rm -Rf chicken ; print "rm=$?" ; ls
-la'
+ builtin rm
+ ls -l chicken
ls: cannot access chicken: No such file or directory
+ mkdir chicken
+ mkdir chicken/foo
+ chmod a-r chicken
+ rm -Rf chicken
+ print rm=1
rm=1
+ ls -la
total 12
drwxr-xr-x 3 test001 users 4096 Aug 21 03:09 .
drwxr-xr-x 9 test001 users 4096 Aug 21 03:07 ..
d-wx--x--x 3 test001 users 4096 Aug 21 03:09 chicken
-- snip --
AFAIK I would expect an error message in this case...
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)