Octal Value 777 An 'Octal Value' or 'Number Value' of a file permission is simply a numeric value, composed of 3 or 4 digits, each one ranging in value from 0 - 7, that represents access grated to users on the system. These octal values, can be used to change or manage a file or directory's permissions, using a well known command-line-utility called chmod.
Obtaining a specified 'Octal Value' usually starts with a file's 'Symbolic Value', and transmuting it to it's corresponding number value. In this case, -x-x-x converted to it's Octal or Number value is 111. For further information on how to transpose file permission's symbolic values to their octal counter part; or to get a better grasp on 'Octal Notation' in general, see our guide on the subject -. Symbolic Value drwxrwxrwx File Permission's 'Symbolic Value', or 'Symbolic Notation', is a string made up of 10 characters that represents access granted to users on the system. Each 'Symbolic Value' string is broken down into 4 sections.
The file type (file or directory), Owner, Group, and Other in that order. The file is the first character (either d or -), while each of the subsequent groups (owner, group, and other) are represented by each subsequent cluster of three characters. In short, a 'Symbolic Value' is the 'string' based counterpart of a corresponding 'Octal Value'. In this case, 777 converted to its symbolic counterpart is 'drwxrwxrwx'. If you're looking for info on how to obtain a symbolic value, or how to transpose an octal value to symbolic notation see our guide on the subject - Type Directory, as denoted by the leading 'd' within it's symbolic value drwxrwxrwx File Directory No Yes Permissions Breakdown User Group Other Read Yes Yes Yes Write Yes Yes Yes Execute Yes Yes Yes Special Octal permissions can be made up of either 3 or 4 values. In the case of '777', a 3 digit octal number, a leading value has not been set, so 777 only represents permissions for User, Group and Other. So in this case a Sticky Bit, SUID or SGID, have not, and cannot be set.
If you wish to set a Stick Bit, SUID, or SGID Sticky Bit SGID SUID No No No How to change your directory to 777 or drwxrwxrwx using chmod Chmod is a well known command line utility, that's used to manage file permissions on MacOS, Linux and other Unix like operating systems. While there are multiple ways to use chmod, on this site, we have chosen to focus exclusively on using chmod with Octal Notation.
The following examples illustrate exactly how to change your desired file to permissions matching '777 or drwxrwxrwx' using the command line and chmod. If you're lost on how to manually manage file permissions, see our guide - From your terminal run the following command, within a directory containing the directory you wish to change permissions on.
In this case the directory name is 'yourDirectory'.
This is something many newbies struggle with (been there). Here's a quick reference on how to make a directory writable by Apache in Mac OS X without giving full permissions to everyone a.k.a chmod -R 777.
Step 1 Set the ownership of your desired directory/file to the www user: sudo chown -R www:staff path/to/folder Step 2 Set the permissions so that the www can write in the directory/file without giving permissions to everyone else: sudo chmod -R 755 path/to/folder Problem solved. Happy coding:-) Note: Works fine with built-in OSX apache, not tested with apps such as MAMP/XAMPP or Homebrew/MacPorts apache installs.