|
From: | Georgiy Treyvus |
Subject: | bug#12494: 0 exit status even when chmod fails |
Date: | Sun, 23 Sep 2012 01:59:37 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
There were a few more vain tries. We tried following through on other crackpot ideas of mine to no avail. Then came ripping out all the hair on my head and other places best left to the imagination, waiting for it to regrow and doing it all over again.
Finally I had him show me the mount options of the relevant partitions. Many I recognized. Some I did not. I started researching those I did not. It turns out they had nothing to do with the problem at hand. But I did inadvertently find out what went wrong as a consolation prize. Apparently chmod doesn't work on vfat or ntfs. Ultimately it was understandable as the permission schemes are radically different and now that I thought about it that'd be quite a feat to be able to translate between them in any meaningful way.
Chmod doesn't work on vfat? Fair enough. But it shouldn't be returning a 0 exit code for failure. Generally when chmod fails or can't do something it returns an non-zero exit code. I see no reason that there should be an exception just because it's incompatible with vfat. This can be very problematic in scripts that rely on knowing the success of the command/exit code. Please look into this.
[Prev in Thread] | Current Thread | [Next in Thread] |