chmod 666 — what rw-rw-rw- means

666 rw-rw-rw-

Everyone can read and write, but nobody can execute.

⚠️ Risky permission. This grants write access beyond the owner — only use it when you truly need it, and prefer tighter, group-based permissions where you can.

Permission breakdown

When to use 666

Common mistakes & gotchas

666 vs the alternatives

Set it with chmod

Apply this permission to a single file:

chmod 666 filename

Or apply it recursively to a directory and everything inside it:

chmod -R 666 directory/

The same thing in symbolic form:

chmod u=rw,g=rw,o=rw filename

Frequently asked questions

What does chmod 666 mean?

chmod 666 sets rw-rw-rw-: the owner, the group, and all other users can read and write the file, but nobody can execute it. It is world-writable but not executable.

Is chmod 666 dangerous?

Yes for regular files — any user or process on the system can overwrite the contents, which means silent data tampering and, for files read by privileged services, potential privilege escalation. Use 644 or 664 instead.

What's the difference between 666 and 777?

666 (rw-rw-rw-) has no execute bit; 777 (rwxrwxrwx) adds execute for everyone. Use neither for normal files. 666 can't make a directory traversable because it lacks the x bit; 777 can but is unsafe.

Why is /dev/null permission 666 then?

Device nodes like /dev/null are special files the kernel manages, and every process legitimately needs to read and write them. That's a kernel-maintained exception — it is not a reason to set your own regular files to 666.

Other common permissions

Or build any permission with the interactive chmod calculator.