chmod 6755 Permission Explained: setuid + setgid Executable

Octal
6755
Symbolic
rwsr-sr-x
Binary
111 101 101
Risk Level
High Risk

Summary: Runs with both the owner's and the group's privileges.

Class Read (4) Write (2) Execute (1) Octal
Owner (u) 7
Group (g) 5
Others (o) 5
6755
rwsr-sr-x
Owner: read/write/execute · Group: read/execute · Others: read/execute
chmod 6755 filename
High Risk Runs with the file owner's privileges. A bug in this program can lead to privilege escalation.
View the full chmod 6755 guide →
Advertisement

chmod 6755 Breakdown

Class Digit Symbolic On a file On a directory
Owner (u) 7 rwx Full access Full access: list, enter, create, delete
Group (g) 5 r-x Read and execute Can list and enter
Others (o) 5 r-x Read and execute Can list and enter
Special 6 — setuid (runs with owner privileges), setgid (directory inherits group)

Is chmod 6755 Safe?

High Risk

When not to use it

Common Use Cases

chmod 6755 Command Examples

# Apply using octal mode
chmod 6755 filename

# Apply using equivalent symbolic mode
chmod u=rwx,g=rx,o=rx,u+s,g+s filename

# Recursive command warning:
chmod -R 6755 /path/to/dir
# Note: -R applies the same mode to files and directories. Use find to treat them separately:
find /path/to/dir -type d -exec chmod 6755 {} +

# Verify permissions
stat -c '%a %A %n' filename    # Linux
stat -f '%Lp %Sp %N' filename   # macOS

# Example ls -l output:
-rwsr-sr-x 1 alice staff 1024 Jan 15 10:00 example.txt

umask Relationship

A umask of 022 makes new directories 6755. Test umask values with our interactive Umask Calculator.

Advertisement

Frequently Asked Questions

What does chmod 6755 mean?

Runs with both the owner's and the group's privileges. In octal notation, the owner receives 7 (read/write/execute), the group receives 5 (read/execute), and others receive 5 (read/execute).

Is chmod 6755 safe?

chmod 6755 is classified as High Risk. Runs with the file owner's privileges. A bug in this program can lead to privilege escalation.

What is chmod 6755 in symbolic notation?

In symbolic notation, chmod 6755 is represented as rwsr-sr-x. You can apply this permission using the equivalent symbolic command "chmod u=rwx,g=rx,o=rx,u+s,g+s filename".

How do I find setuid and setgid files on my system?

You can discover all setuid and setgid binaries across your Linux system using the find command: "find / -perm /6000 -type f -exec ls -la {} + 2>/dev/null". Security auditors run this command periodically to detect unauthorized setuid executables that could provide attackers with privilege escalation pathways.

Related Permissions

Change one bit:

Related Guides

Advertisement