Page 1 of 1

can i set file priveleges by automagic?

Posted: 09 May 2018 11:33
by Friend1
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.

Re: can i set file priveleges by automagic?

Posted: 14 May 2018 17:12
by Desmanto
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