chmod 666: readable and writable by every user
Runs in your browser — nothing you paste leaves this page. How we prove that
chmod calculator playground
The matrix, octal and symbolic fields all stay in sync — edit any one and the others follow.
Results update as you type — press Enter to run now.
`chmod 666 file` sets `rw-rw-rw-`: owner, group and everyone else can read and overwrite the file, and nobody can execute it. It is world-writable, so it is almost never a mode to choose deliberately for a regular file.
What chmod 666 means
In 666 the first digit is the owner, the second the group and the third everyone else: the owner gets read and write, the group gets read and write, and others get read and write.
ls -l shows -rw-rw-rw-. Each 6 is 4 + 2, read plus write. There is no execute anywhere, which is why 666 is the starting point the kernel uses for new regular files before the umask is applied: under umask 022 a new file becomes 644, under 002 it becomes 664.
Where you actually see 666
Device nodes such as /dev/null, /dev/zero and /dev/tty are crw-rw-rw-, mode 666, because every process must be able to write to them. That is legitimate for a device; for a regular file it means any local account can change or truncate its contents.
You also meet it when a program creates a file with an explicit 0666 and the process umask is 0, common in some containers. If files in a volume appear as 666, check the umask of the process that wrote them before reaching for chmod.
Risks and better choices
A world-writable log, config or data file lets any local user plant content another program will trust. Prefer 644 when only the owner writes, 664 when a group shares writing, and 600 when the content is private.
Note that deleting or renaming a file is controlled by its directory's write permission, not by the file's mode, so 666 does not by itself let others delete the file. It does let them empty it, which is usually just as bad.
Related values
666 is the no-execute counterpart of 777, and shares its main flaw. 664 removes write from others, which is the right choice for files a group edits together. 644 removes group write as well, leaving the owner as the only writer. 600 removes everyone but the owner, and 444 removes write from all three classes when the goal is a read-only file.
FAQ
Questions, answered.
Tap a question to expand the answer.
Why do new files start at 666 and not 777?
Programs normally request 0666 for regular files and 0777 for directories, and the umask removes bits from that. Files are not given execute by default because most files are data, not programs.
Is 666 safer than 777?
Only slightly. It drops execute, but the file is still writable by every account, which is the main risk. Use 644, 664 or 600 depending on who needs to write.
More free, private DevOps tools.
The chmod Calculator is one tool in OpsCanopy — a growing canopy of browser-based validators, converters and testers that never touch a server.
More in Utilities
Read more about this
- chown command in Linux: change file owner and group The chown command in Linux explained: user:group syntax, chown -R and symlinks, --reference, chgrp, chmod vs chown, and fixing Docker volume permission errors with numeric IDs.
- chmod command in Linux: syntax, examples and common mistakes The chmod command in Linux explained: octal and symbolic modes, chmod +x, chmod -R and its traps, setuid, setgid and sticky bits, umask, and how to fix Permission denied.
42 free tools, every one offline-capable — opscanopy.com works with no signup and nothing uploaded.
Related utilities: the UUID / ULID Generator, the Case Converter and the Slugify tool — or browse the full tools directory.
Provided as-is for convenience; always double-check permission changes on production systems. OpsCanopy is free and open.