Semi-brief introduction to file permissions,
Often you may see someone setting permissions using octal values, this may be confusing at first, but I'll try to help you out.
First, let's say someone sets the permission 666 on a file, you may have a chill run up your spine if you're religious, but it's honestly a very liberal number..
Octal, or base 8, has 8 possible values.. 0 through 7.
Binary, or base 2, has 2 possible values.. 0 and 1.
Binary is important in computing because it represents 2 universal states, ying and yang, right and wrong.. on and off.
1 is the equivalent of true.
0 is the equivalent of false.
So, 6 octal is 110 binary..
The first 2 binary digits of 6(110) represent the read and write permissions of the file, the last digit represents execute.
So, When you see "666", the first digit represents the owners permissions, the second digit represents the group permissions, the last digit represents "everyones" permissions.
In this case, everyone can read and write.. but nobody can execute the file.
Here is a basic reference:
I should note, occasionally you may see permissions set as 4 digit octals..
I hope I helped somebody out, take care, feel free to post if you have questions.
Last edited by BSDfan666; 5th June 2008 at 01:03 AM.
|binary, chmod, octal, permissions, unix|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Permissions error||J05HYYY||NetBSD Package System (pkgsrc)||1||7th October 2009 11:05 PM|
|Permissions for zzz / acpiconf||Mantazz||FreeBSD General||0||15th September 2009 10:43 PM|
|permissions and FTP/HTTP||Yuka||FreeBSD General||0||20th October 2008 10:32 PM|
|Designing BSD Rootkits: An Introduction to Kernel Hacking||cajunman4life||Book reviews||2||21st June 2008 03:27 PM|