Greetings, In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ? The section is as follows find -perm mode : List file with the octal permission mode I can find a decent understandable answer in the man pages or google. Thanks -- -- Chadley Wilson Production Line Supervisor Pinnacle Micro Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX =====================================
What that means is you are "finding" files with specific permissions. For example find / -type f -perm -0002 is going to find any files (the type f sets this, use d for directories) that are world writable. The 4 numbers following the -perm are the same as chmod's perms. Do a man chmod to get a full listing. On Thu, 2004-09-09 at 07:24, Chadley Wilson wrote:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
Thanks -- -- Chadley Wilson Production Line Supervisor Pinnacle Micro Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX ===================================== -- Thank you,
Matt Duval Sr. Network Engineer HealthTrans www.healthtrans.com "Transforming Healthcare, One Transaction At A Time" (720) 493-8252 6061 South Willow Drive Suite 125 Greenwood Village, CO 80111
On Thursday 09 September 2004 15:24, Chadley Wilson wrote:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
Ok. From 'man find': -perm mode File's permission bits are exactly mode (octal or symbolic). Symbolic modes use mode 0 as a point of departure. -perm -mode All of the permission bits mode are set for the file. -perm +mode Any of the permission bits mode are set for the file. Now what exactly don't you understand from the above? ('man chmod' might clear up things a bit too) Cheers, Leen
On Thu, 9 Sep 2004 15:24:05 +0200 Chadley Wilson wrote:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
This page has some information about octal permission mode: http://cfa-www.harvard.edu/cf/user_meetings/unix_groups/changing.html HL
Chadley Wilson wrote:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
Thanks
man chmod
Chadley wrote regarding '[SLE] octal permission mode' on Thu, Sep 09 at 08:24:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
It says that because the file permissions are specified using a number represented in octal - base 8. There are three bits for each of the four permission groups, each of which can be on or off - AKA 1 or 0. Three positions with 2 possiblities each gives 2^3, or 8. Hence, octal is the most convenient way to group the 4 sets of three binary digits. octal 0755 = binary 000111101101 = "ls output" ---rwxr-xr-x. It could just as easily be hexadecimal (1ED) or decimal (493), but the base-8 system is a lot handier for human use. If you've ever done a "chmod 0755 ~/public_html" then you've seen octal permission modes - the 0755 in there. Like everyone else said, "man chmod" th figure out exactly what each bit means. --Danny, noting that "ibase" and "obase" are real handy for checking your base conversions with bc... :)
On Thu, 9 Sep 2004 12:37:21 -0500
Danny Sauer
Chadley wrote regarding '[SLE] octal permission mode' on Thu, Sep 09 at 08:24:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
It says that because the file permissions are specified using a number represented in octal - base 8. There are three bits for each of the four permission groups, each of which can be on or off - AKA 1 or 0. Three positions with 2 possiblities each gives 2^3, or 8. Hence, octal is the most convenient way to group the 4 sets of three binary digits. octal 0755 = binary 000111101101 = "ls output" ---rwxr-xr-x. It could just as easily be hexadecimal (1ED) or decimal (493), but the base-8 system is a lot handier for human use.
If you've ever done a "chmod 0755 ~/public_html" then you've seen octal permission modes - the 0755 in there. Like everyone else said, "man chmod" th figure out exactly what each bit means.
I just want to add to this:
As mentioned above, the file permissions are stored effectively as 3
groups of 3 bits representing read-write-execute. The octal code as
mentioned above is used to easily refer to bits:
Octal Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
So, instead of having to deal with binary directly, the octal system was
used.
--
Jerry Feldman
Jerry wrote regarding 'Re: [SLE] octal permission mode' on Thu, Sep 09 at 15:43: [...]
I just want to add to this: As mentioned above, the file permissions are stored effectively as 3 groups of 3 bits representing read-write-execute. The octal code as mentioned above is used to easily refer to bits: [...]
It's actually 4 groups of 3 bits - though most people don't have to worry about the setGID, setUID, or sticky bits most of the time. Hence, the chmod etc. methods let you just specify the last 3 if you want. --Danny
participants (7)
-
Chadley Wilson
-
Danny Sauer
-
Howell Luther
-
James Knott
-
Jerry Feldman
-
Leendert Meyer
-
Matt T. Duval