[완료] permissin "S"

auditory의 이미지

디렉토리의 permission 중에 "S" 퍼미션의 의미는 무엇인지요??

trac plugin을 설치했는데, 잘 동작하지 않아서 살펴보니,

디렉토리의 퍼미션이 모두 아래와 같습니다.

drwx--S--- 2 root staff

안에 있는 파일들은

-rwxr-xr-x 1 root staff

이고요.. 정상적인건가요?

hjkimno1의 이미지

http://community.365managed.com/l_etc/288 이곳에서 가져왔습니다.

setuid, setgid
실행 퍼미션에는 setuid와 setgid라는 특별한 퍼미션이 있다. setuid는 심볼릭 모드로 's'로 표현되고 8진수 모드로는 4000
으로 표현된다. setuid 퍼미션이 설정되어 있는 실행 파일은 실행되는 동안에는 그 파일의 소유자 권한을 가지게 된다.
이러한 이유때문에 root 소유의 setuid 퍼미션이 포함되어 있는 파일은 아주 신중히 관리를 해야 된다. 저는 사용 안하는
setuid 실행 파일은 setuid 퍼미션을 제거해서 따로 보관하고 있습니다. setgid 퍼미션이 포함되어 있는 실행 파일은 실행되는 동안은 그 파일의 소유 그룹의 권한을 가지는 것 빼고는 setuid와 같다. setgid의 8진수 모드는 2000 이다.
setuid 퍼미션을 포함하고 있는 실행 파일을 ls -al 명령으로 확인해 보면 다음과 같이 소유자 실행퍼미션에 's'라고 되어
있는 것을 확인할 수 있다.
[root@rootman root]# ls -al /bin/su
-rwsr-xr-x 1 root root 14112 1월 16 2001 /bin/su

setgid가 포함되어 있는 실행 파일을 ls -al 명령으로 확인하면 소유 그룹의 실행 퍼미션에 's'가 설정되어 있는 것을 확인
할 수 있을 것이다.
[root@rootman root]# ls -al /usr/bin/man
-rwxr-sr-x 1 root root 14112 2월 5 2001 /usr/bin/man

bootmeta의 이미지

http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm

------------
SUID and SGID for Directories

The SUID bit has no effect on directories.

In Linux and Solaris, when SGID is set on a directory files created in that directory will have their GID automatically reset to that of the directory's GID. This means that setting the SGID bit on a directory causes any new files or directories created within to inherit the group identity of that directory rather than that of the user. Also, new sub-directories will inherit the SGID bit as well.

The purpose of this approach is to support project directories: users can save files into such SGID directories and the group identity of the file automatically changes. This is useful for example on the Document Root of a website or other directories containing a set of files worked on by a specific group of users. (It works especially well if each user's primary group (*) is a private group for that user, and the umask (*) setting is 002). However, setting the setgid bit on directories is not specified by standards such as the Single Unix Specification [Open Group external link].
-----------

linux나 solaris의 경우, directory에 대해 SGID가 설정되면, 해당 directory 내 생성되는 파일, directory의 GID는 owner의 group id가 아닌 parent directory의 GID로 자동 설정됩니다.

즉 발제자가 올려주신 예로 설명하자면 directory에 대해 SGID가 설정된 후, 해당 directory 내 생성된 모든 파일들의 group-id는 파일 owner의 group-id와 상관없이 무조건 staff가 됩니다.

auditory의 이미지

우선 답변 주셔서 감사합니다.. ^^

소문자 's'가 아니라 대문자 'S'도 마찬가지인가요?

그러면 현재 상황에서 staff가 아니면 읽기가 안되고 있는 상황인가요..

bootmeta의 이미지

대문자인 경우 executable off, 소문자는 on
제 이전 댓글 링크 문서를 보면 자세한 정보가 나와 있습니다.

trac을 사용한 경험도 없고, 해당 시스템 설정이 어떻게 되있는지 모르는 고로 제가 답변을 드릴 수가 없군요.
아마 다른 고수분이 잘 설명해 주실 듯 합니다.
그 전에 google로 검색하다 보면 충분히 해답을 얻으실 겁니다.

auditory의 이미지

답변감사합니다..

전체 디렉토리 권한을 755/파일은 644 로 바꾸니 잘 되네요..

감사합니다~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.