chmod 755 myfile.sh # Makes a script executable by everyone
The first character identifies what the object is. The d stands for directory . If this were a standard text file, you would see a hyphen ( - ) instead. drwxr-xr-x
The owner has full, god-mode privileges over this directory. chmod 755 myfile
| Position | Character | Meaning | |----------|-----------|---------| | 1 | d | File type: directory | | 2 | r | Owner: read | | 3 | w | Owner: write | | 4 | x | Owner: execute | | 5 | r | Group: read | | 6 | - | Group: write (absent) | | 7 | x | Group: execute | | 8 | r | Others: read | | 9 | - | Others: write (absent) | | 10 | x | Others: execute | The owner has full, god-mode privileges over this directory
drwxr-xr-x (or 755 in octal) is the (e.g., /home/user/public_html ). It allows the owner full control while giving everyone else read/execute access – ideal for shared content that shouldn’t be modified by others.
To the uninitiated, it looks like a random alphabet soup or a cat walking across a keyboard. To a system administrator or developer, it is a precise, binary-derived code that dictates the very heartbeat of file system security.