You used the path /sdcard/
in your test - is your SD card formatted with a file system that supports standard Unix permissions? ( FAT not.)
You did not specify an explicit path to chmod(1)
in your line - are you sure that chmod(1)
:
- on your device
- is available with the current value of the
PATH
environment variable?
You can only change permissions on your files; Are you sure that no matter which your application has an effective user ID, the file on the SD card belongs?
Finally, Android may have additional security restrictions when changing file permissions . I do not know Android very well, but perhaps changing the permission bits for files requires manifest entries that declare operations, perhaps changing file permissions is only possible through the APIs provided.
source share