2

I try to execute chmod on a file with Termux, but it sends back an error which I'm unable to solve.
My phone is not rooted. If you can help me I would be most grateful to you for this! Here is the command and the error:

$ chmod +x /sdcard/meta-install.sh
chmod: changing permissions of 'meta-install.sh': Operation not permitted

Thanks!

0

2 Answers 2

3

Android does not allow you to create executable files within the sdcard (internal storage, mounted in userspace) partition without root.

A workaround would be to execute the file as bash meta-install.sh, assuming it is a bash file. (Alternatively sh meta-install.sh to run it using sh as the shell).

1
  • Thank you, great advice.
    – Pasha
    Commented Dec 19, 2020 at 1:53
1

Filesystem on Android's internal memory (called External Storage) is SDCardFS (successor of FUSE) which imposes a mask mode (fix permissions) on all files and directories. It's an emulated/virtual filesystem, not the real one. You can only change permissions with chmod from /data/media/ which is the real filesystem (ext4 or f2fs). But /data/media/ is only accessible to root user.

Further Reading:

Related:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .