Permissions in Linux (or UNIX) can be difficult to understand. Here is a step-plan to determine the right combination of permissions.
Either read in the "Explanation" field in the table below what you want to do, or do
ls -l and see what it means. Each object (file, directory, sockets, device, etc) has 10 positions to indicate what's possible with the object. For example you could see
-rwxr-x---. You can split the 10 positions up into these parts:
|3||-wx||Write and execute access.***|
|5||r-x||Read and execute access.|
|6||rw-||Read and write access.|
|7||rwx||Read, write and execute access.|
*= This is an odd combination, executing something that's not readable is not possible.
**= A strange combination; writing when you are not able to read.
***= This is an weird combination, you can't execute when you can't read the file, though you may write the file.
There are some special permission sets. When you see an "s" or an "S" on the location where you'd expect an "x", this means:
chmod 4755 object.
chmod 4650 object.
chmod 2775 object. This bit on a directory means all files in that directory that will be created, will be owned by the group that owns the directory.
chmod 2745 object.