setuid 적용파일의 color 변경.

yundorri의 이미지

Fedora3,4를 사용 중입니다.

user@swdev2]$ chmod 4775 test

user@swdev2]$ ls -ltr test

user@swdev2]$ -rwsrwxr-x 1 root root 37408 3월 22 08:40 test

라고 하면 붉은 바탕에 흰 글자로 출력됩니다.

마치, 깨진 링크같은 모양이라서 보기가 아주 안좋습니다.

/etc/DIR_COLORS 에는 속성으로 색상을 지정할 수 있는 내용이 나와있지 않아
알 수가 없네요.

도움 부탁드립니다.

codebank의 이미지

Gentoo의 경우 DIR_COLORS에 자세하게 써있네요.

 # cat /etc/DIR_COLORS
...
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00   # global default, although everything should be something.
...
SETUID 37;41    # file that is setuid (u+s)
SETGID 30;43    # file that is setgid (g+s)
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44    # dir with the sticky bit set (+t) and not other-writable
 
# This is for files with execute permission:
EXEC 01;32
...

위에서 SETUID부분을 참고하시면 되겠네요. 색상은 위에 같이 인용해 놓았습니다.

--------------------------------
좋은 하루되세요.

------------------------------
좋은 하루 되세요.

yundorri의 이미지

아~~~

Fedora에서는 SETUID, SETGID, STICKY_OTHER_WRITABLE, OTHER_WRITABLE, STICKY 등등의 키워드를 인식하지 못하는것 같습니다.

ls만 upgrade 할 수 도 있는건지...