|
|
|
¸®´ª½ºÆÁ Go Unix Power Tools Online Book
Go Bash Guide
|
|
Read No. 94 article |
2002-02-03 02:27:45 |
|
|
|
|
NickName |
Ç®ºñ´© |
Subject |
find ¸í·ÉÀ¸·Î ¹éµµ¾î ã±â |
|
|
±Û¾´ÀÌ: À̸íÈÆ
¿ì¸®³ª¶ó ¸®´ª½º ¼¹ö¸¦ º¸¸é
Å©·¡Å·(ÇØÅ·)¿¡ ¿ÏÀüÈ÷ ¹«¹æºñ »óÅÂÀÔ´Ï´Ù.
ÁÖ- ¿ì¸® ¸ðµÎ ÇØÅ·À̶ó°í ÇÏÁö¸»°í Å©·¡Å·À̶ó°í ºÒ·¶À¸¸é ÁÁ°Ú½¿´Ù.
±×·¡¼ Á¶±ÝÀ̳ª¸¶ µµ¿òÀÌ µÇ°íÀÚ ¹éµµ¾î ã´Â ¹æ¹ýÀ» ¾Ë·ÁÁÙ·Á°í ÇÕ´Ï
´Ù. ¹°·Ð À̰͸¸À¸·Î ÇØ°áµÉ¼ö ¾øÁÒ
¸ÇóÀ½ Å©·¡Ä¿ÀÇ Ä§ÀÔÀÌ ÀǽɵǸé
setuid¿Í setgid¸¦ Á¡°ËÇØ¾ß ÇÕ´Ï´Ù.
±×·¯±â À§ÇÑ °Ë»ö ¸í·É¾î find !!!
¿¹)
# find / -type f -perm +6000 -ls
¼³¸í
f: ÀϹÝÀûÀÎ ÈÀϵé,
+6000: Æ۹̼ÇÀÌ 6000ÀÎ ¸ðµç°Í (any of the permission bits)
-ls : »ó¼¼ Ãâ·Â `ls -l`°ú °°À½
¼ö»óÇÑ ÈÀÏÀÌ º¸ÀÌ¸é »èÁ¦Çϰųª
#chmod -s ¼ö»óÇÑÈÀÏ
-s: setuid,setuid ÇØÁ¦
¶ÇÇÑ ½Ã½ºÅÛ°ü¸®»ó ½Ç¼ö·Î ¾²±â¸ðµå·Î º¯°æµÈ ÆÄÀϵµ ÀÖ½À´Ï´Ù.
ÀÌ°É ?´Â ¹æ¹ý,´Ü ¸µÅ©ÈÀÏÀº ¾Èã¾Æµµ µÇ°ÚÁÒ,Á¤±ÔÇ¥Çö½ÄÀ» ¾²ÀÚ ..
#find / -perm -2 ! -type l -ls
¼³¸í -2 : Æ۹̼ÇÀÌ 2ÀÌ»ó ¸ðµç °ÍÀ» ÁöĪÇØ¿ä (all of the permission
bits)
½Éº¼¸µ¸µÅ©ÆÄÀÏÀÌ ¾Æ´Ñ ¸ðµç µ¥ÀÌÅÍÈÀÏÀ» ã´Â °Í
ÁÖ·Î /dev¿Í /tmp¿¡ ¸¹¾Æ¿ä..
Âü°í·Î ¼ÒÀ¯ÀÚ³ª ±×·ìÀÌ ¾ø´Â ÆÄÀÏÀ» ã´Â ¹æ¹ýÀ» ¾Ë·Áµå¸®°Ú½À´Ï´Ù. ÀÌ
°Ç Å©·¡Ä¿°¡ °íÀÇÀûÀ¸·Î ¸¸µç°æ¿ì°¡ ¸¹½À´Ï´Ù.
ã´Â ¹æ¹ý
find / -nouser -o -nogroup
-o(Á¤±ÔÇ¥Çö½Ä or¸¦ ¶æÇØ¿ä)
|
|
Page Loading [ 0.02 Sec ]
SQL Time [ 0 Sec ]
|
|
|