Modification of files with 777 permissions but not with 755 permissions?

Permissions on UNIX and UNIX-like systems work as follows...

rwxrwxrwx = 777

You will notice there are 3 'sets' of rwx. These are designated for:

  • user
  • group
  • other

user - the person who has ownership of the file/directory.
group - if a group has control over a specific set of files, and you are in that group, you inherit the permissions assigned to that group.
other - you fall into neither of the above categories.

A more graphical representation:

uuu | ggg | ooo
rwx | rwx | rwx
 7  |  7  |  7

What does 777 come from you might ask?

Read permission (r) - 4
Write permission (w) - 2
Execute permission (x) - 1

each seperate number in the 3-digit sequence represents the user,group, and other categories in that exact order. If the number is 777 for example, everyone has full access to the file. If it is 111, everyone only has execute access.

With files that have 755 permissions, if you are not the owner of the file, you only have read and execute permissions. You will not be able to write to these files. For the files with 700 permissions, you can probably write in these because you created them yourself. The umask command will tell you the number you can subtract from 777 to see what permissions files are created with by default on your system.


Have you checked the ownership of the files with 755 permissions?
You have to be the owner of these files to be able to 'write' to them.

You are very likely owning the files with 700 permissions,
which would explain your ability to write to them.

-rwxrwxrwx
       --- controls for Others
    ---    controls for Group
 ---       controls for User or Owner