Linux file permissions

chmod 666 (rw-rw-rw-)

Owner: read, write · Group: read, write · Others: read, write

666numeric
rw-rw-rw-symbolic
6 · 6 · 6owner · group · others
Commands
chmod 666 filename chmod u=rw,g=rw,o=rw filename chmod -R 666 folder/ # apply to a folder and everything in it

Security warning: 666 lets any user on the system modify these files. On web servers use 755 for folders and 644 for files and fix ownership with chown instead.

Change any permission with the chmod calculator.

What chmod 666 means

WhoDigitLettersCan
Owner (user)6rw-read, write
Group6rw-read, write
Others6rw-read, write

Each digit is the sum of read (4), write (2) and execute (1).

When to use 666

Files anyone may edit — usually a security risk.

Related permissions

Questions

What does chmod 666 mean?

chmod 666 sets the permissions to rw-rw-rw-: the owner can read, write, the group can read, write and others can read, write.

When should I use 666?

Files anyone may edit — usually a security risk.

What is 666 in symbolic form?

666 is rw-rw-rw- (shown by ls -l as -rw-rw-rw- for a file or drw-rw-rw- for a folder). The symbolic chmod command is chmod u=rw,g=rw,o=rw file.