plain/devtools home

What chmod 777 means

chmod 777 gives the owner, the group and everyone else read, write and execute access. The symbolic form is rwxrwxrwx. It fixes a permission denied error by removing all limits, which is rarely the right fix.

Last reviewed 2026-11-04.

chmod-calculatorsamplesCtrl↵ run · s sample
WhoReadWriteExecuteSpecial
Owner (u)
Group (g)
Others (o)

never leaves your browser

What it does, class by class

  • Owner: read, write, execute.
  • Group: read, write, execute.
  • Others: read, write, execute.
  • Warning from the calculator: Anyone on the system can write to this. Avoid world-writable modes outside shared directories with the sticky bit.

Worked example

A web app cannot write to uploads/. The 777 shortcut works but lets every account on the machine change that folder. Find who needs access and grant only that:

$ ls -ld uploads
sudo chown www-data:www-data uploads
chmod 755 uploads      # owner writes, others read
chmod 775 uploads      # or: group also writes

What to use instead

  • 755 for directories and programs, 644 for plain files. See 755 vs 644.
  • 775 when a trusted group must also write.
  • 700 or 600 when only the owner should touch it.
  • A shared drop directory that really must be world-writable should also set the sticky bit: chmod 1777, as /tmp does.

Running this on a server

World-writable files on a server are an easy way to get compromised. On a VPS you control the users and groups; the hosting guide covers when a managed host is the safer fit.

Frequently asked questions

Is chmod 777 ever correct?

On a directory with the sticky bit (1777), as in /tmp, where many users need to create files. On regular project files, no.

Why does permission denied persist after chmod 777?

A parent directory may lack the execute bit, the filesystem may be mounted read-only, or SELinux or AppArmor may be blocking access.

What should I use instead of 777 for a shared upload folder?

Give the web server user ownership and use 755, or put it in a group and use 775.

Sources

Related

esc
↑↓ move↵ open? all shortcuts

Keyboard shortcuts

Cmd or Ctrl shortcuts always work.
Everywhere
Everywhere
Open the command palette
CtrlK
Open the palette (outside a text field)
/
Show these shortcuts
?
Toggle light and dark theme
t
Go home
gh
Go to all tools
gt
On a tool page
On a tool page
Run the main action
Ctrl↵
Copy the output
c
Load the next sample
s
Focus the input
i
Leave a text field
Esc
Previous or next tool
[]
In the palette
In the palette
Move the selection
↑↓
Open the selected item
↵
Close
Esc