[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /usr/src and file permissions



On Sun, Nov 14, 1999 at 12:52:28PM -0600, David J. Kanter wrote:
> drwxrwsr-x    4 root     src          1024 Oct 16 00:18 oldsrc
> drwxr-xr-x    5 root     root         1024 Nov 14 12:33 src
> 
> Could someone explain the difference? I tried setting chmod g=+r+w+s
> /usr/src, but that apparently didn't work.

Since that looks kinda neat, I tried the following (as root):

  chown -R root.src /usr/src
  find /usr/src/ -type d -exec chmod 2775 {} \;

So my permissions for /usr/src and /usr/src/* are now:

  drwxrwsr-x  6 root  src     1024 Nov  5 00:02 /usr/src
  drwxrwsr-x  3 root  src     1024 Sep  2 11:49 /usr/src/debian
  -rw-rw-r--  1 root  src  1095842 Nov  4 14:24 /usr/src/kernel-im...
  -rw-rw-r--  1 root  src      352 Nov  4 13:56 /usr/src/kernel-so...
  -rw-rw-r--  1 root  src    62844 Nov  5 00:02 /usr/src/lm-sensor...
  drwxrwsr-x  3 root  src     1024 Jun 24 18:07 /usr/src/modules
  drwxrwsr-x  7 root  src     1024 Oct 25  1998 /usr/src/redhat
  lrwxrwxrwx  1 root  src       46 Sep  2 12:16 /usr/src/admin -> ...
  lrwxrwxrwx  1 root  src       45 Sep  2 12:16 /usr/src/base -> /...
  lrwxrwxrwx  1 root  src       45 Sep  2 12:16 /usr/src/comm -> /...
  [etc...]

Could someone please remind us exactly what setgid on directories
does?  I think it causes any file created in that directory to
automatically have its group ownership, but I'm not certain.

-Kevin


Reply to: