rwx Versus rws

rwx simply means read:write:execute.

the user in question has the ability to do all 3 mentioned

see rwxrwxrwx  ==> means full privilege is available for that file OR directory

however when we see rws , this is called the “setuid or suid” bit, which tells the operating system to execute that program with the userid of its owner. This is typically used with files owned by root to allow normal users to execute them as root with no external tools (such as sudo).

You can set the suid bit using chmod, eg chmod 4755 which will give a file the normal permissions 755 does (rwxr-xr-x) and add the suid bit to give rwsr-xr-x

You can clear the setuid bit by issuing a normal chmod command with a 0 prepended to it. For example, to set permissions back to rwxr-xr-x you would use chmod 0755.

also, see below

  • RUID : Identify the real user, normal user cannot change it.
  • EUID : Decides access level, normal user can change it.
  • SUID : Saves the EUID, normal user cannot change it.
  • Real Group ID : Identify the real group
  • Effective Group ID and Supplementary group ID : Decides access level

Leave a Reply

Your email address will not be published. Required fields are marked *