Understanding File Permissions

Understanding File Permissions
"How to set the file permission, sorry I`m a noob please explain?" well this we come across on all threads, at some given point in time.
r - Read permission. Whether the file may be read. In the case of a
directory, this would mean the ability to list the contents of the
w - Write permission. Whether the file may be written to or modified. For
a directory, this defines whether you can make any changes to the contents
of the directory. If write permission is not set then you will not be able
to delete, rename or create a file
x - Execute permission. Whether the file may be executed. In the case of a
directory, this attribute decides whether you have permission to enter,
run a search through that directory or execute some program from that
Reason it being simple, so suggestion to do as said below:
1) copy the file XXXX to your Internal or External sd-card
2) push the file XXXX to system/xxxx folder
3) set permissions to rw-r--r-- blah, blah, blah
4) reboot your phone and you`re done
Then comes the question from some people:
1) I have done it accordingly, but I`m really confused regarding File permission though, please explain?
2) How to set File Permission?
3) what is rw-r--r-- blah, blah i cannot get it? etc.
In order to set the file permission all you need is to have Root explorer or similar type of File manager app been installed on your phone with Root access.
When you open the File manager you see all your files and folder listed there, that`s not our main concern, but something below each one of those files or folders is what we are really interested in.
Under, say, Data folder you see something like 'rwxrwx--x' which is of real concern here.
When you long press on the same Data Folder a pop-up appears as below:​
Fig 1.​
And if you`ll select Permissions in that pop-up menu, you will see this:
Fig 2.​
As you can see in the pic above the permission is set to 'rwxrwx--r' (or 771 according to Table below)
So in order to set the right Permission for a file, after you have copied the file to the relevant folder, all you have to do is to follow the below steps and/or the Table guide.
You`ll need File Manager app like Root Explorer installed and phone with root access.
1) Find the File which you have copied to the appropriate Folder for which you have to set Permissions with the above installed file manager app.
2) Long press on the file to open a pop-up menu as shown in Fig 1. above.
3) Set Permission accordingly as it`s suggested, using the table guide below as reference.
4) Then reboot your phone for the Permission to take effect.
Table Guide for Reference
No - Box is Unchecked, Yes - Box Checked
So, for example:
777 is the same as rwxrwxrwx
755 is the same as rwxr-xr-x
666 is the same as rw-rw-rw and so on.

credits: sun90 (xda)
edited by arawn
Sep 3, 2012