can i set file priveleges by automagic?

Post your questions and help other users.

Moderator: Martin

Post Reply
Friend1
Posts: 52
Joined: 03 May 2017 06:00

can i set file priveleges by automagic?

Post by Friend1 » 09 May 2018 11:33

Hi Desmanto,

Can i set file priveleges to write on readonly file? İf is possible please give me a simple example to do this. Thank you very much.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: can i set file priveleges by automagic?

Post by Desmanto » 14 May 2018 17:12

Do you mean set file permission? You can use execute command or execute root command (if the file in /data or some protected partition).

Example, one of my TWRP backup flow, use to change the permission of the recovery folder, execute root command.

Code: Select all

chmod 0777 /cache/recovery
This will set the permission of the recovery folder to all read/write/execute, so I can put openrecovery script there.

For further use of chmod, look at the manual page : https://linux.die.net/man/1/chmod
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply