chmod 240 Permission Explained

Notice: This is an unusual permission set: some classes have more access than the class above them. It is rarely correct in practice.
Octal
240
Symbolic
-w-r-----
Binary
010 100 000
Risk Level
Low Risk

Summary: chmod 240 gives the owner write, the group read, and everyone else no access.

Class Read (4) Write (2) Execute (1) Octal
Owner (u) 2
Group (g) 4
Others (o) 0
240
-w-r-----
Owner: write · Group: read · Others: no access
chmod 240 filename
Low Risk Unusual: a lower class has permissions the class above it lacks.
View the full chmod 240 guide →
Advertisement

chmod 240 Breakdown

Class Digit Symbolic On a file On a directory
Owner (u) 2 -w- Write only (rarely useful) No practical effect without x
Group (g) 4 r-- Read only Can list names, but not enter
Others (o) 0 --- No access Cannot list, enter, or modify

Is chmod 240 Safe?

Low Risk

Common Use Cases

240 is uncommon in standard Linux setups. The closest widely used permission is chmod 640.

chmod 240 Command Examples

# Apply using octal mode
chmod 240 filename

# Apply using equivalent symbolic mode
chmod u=w,g=r,o= filename

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

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

# Example ls -l output:
--w-r----- 1 alice staff 1024 Jan 15 10:00 example.txt

umask Relationship

A umask of 537 makes new directories 240 and new files 240. Test umask values with our interactive Umask Calculator.

Advertisement

Frequently Asked Questions

What does chmod 240 mean?

chmod 240 gives the owner write, the group read, and everyone else no access. In octal notation, the owner receives 2 (write), the group receives 4 (read), and others receive 0 (no access).

Is chmod 240 safe?

chmod 240 is classified as Low Risk. Unusual: a lower class has permissions the class above it lacks.

What is chmod 240 in symbolic notation?

In symbolic notation, chmod 240 is represented as -w-r-----. You can apply this permission using the equivalent symbolic command "chmod u=w,g=r,o= filename".

Related Permissions

Change one bit:

← chmod 237 chmod 241 →

Related Guides

Advertisement