Could there ever be a situation in which touch
would work and mkdir
would fail, within a directory.
I understand that both these calls involve writing to the inode
of the parent directory. So if touch worked, doesn't it automatically mean that the inode is writable and hence, the mkdir
couldn't possibly fail.
This was Android (I only heard a report, didn't actually see this case) and the commands were being run from the terminal emulator, in the /system
directory (after requesting su
), but that shouldn't make a difference IMO.
EDIT:
mkdir failed with "permission denied"