u = user (owner of the file) g = group (group that the file belongs to) o = others (users that aren't the owner and aren't a member of the group to whom the file belongs) a = all `chmod 700 file` gives only the file's owner the ability to read, write and execute the file. `chmod go-rwx file` does the same thing (removes group and others permissions to read, write and execute). `chmod a+rwx file` gives all users and groups the ability to read, write and execute the file. `chmod 777 file` does the same thing. You can also specify separate things like "a+x" (allow all users to execute a file) or "o-w" (allow only the owner and owning group to write to the file by disallowing others write access). Some commonly used ones are: 755 - allow read/execute access to all, and allow the owner to fully manipulate the file 744 - allow read access to all, and allow the owner to fully manipulate the file 700 - only allow the owner to fully manipulate the file 644 - allow read access to all, and allow the owner to read from and write to the file 500 - only allow read/execute access to the file 000 - is this even used? perhaps by a newbie... who would want to disallow ALL access? I have yet to figure out how umask values work though. The whole four-digit thing is what gets me. :P ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
| Response Title | Author and Date |
| Four Digit chmod | qbguy on Mar 30 |
| * If root sets the sticky bit makes it impossible for non-root to delete files | qbguy on Mar 30 |
| * Oh yeah! I remember those now. That's the fun of Linux - you never stop learning! ^_^ | rpgfan3233 on Mar 30 |