yesthattom: (Default)
[personal profile] yesthattom
If you write to a file that is SUID or SGID, the SUID / SGID bits on the file are removed as a security precaution against tampering (unless uid 0 is doing the writing).

(See FreeBSD 5.4 source code, sys/ufs/ffs/ffs_vnops.c:739)

Date: 2006-03-23 03:34 am (UTC)
From: [identity profile] rainbear.livejournal.com
Hmm. That explains why that kept happening at Lumeta with the SGID files we had...

Date: 2006-03-23 02:21 pm (UTC)
From: [identity profile] rowan-redbeard.livejournal.com
And on Solaris, you can not set the SGID bit on a directory with absolute modes with standard chmod(1). You have to use symbolic modes or the GNU equivalent. I just learned that last week.

Date: 2006-03-23 06:50 pm (UTC)
From: [identity profile] yesthattom.livejournal.com
I think all Unix systems require symbolic modes for SGID and SUID.

Date: 2006-03-23 08:05 pm (UTC)
From: [identity profile] rowan-redbeard.livejournal.com
Actually, we poked around and found that Solaris is the only one that does. It's particular to directories and the SGID bit, and the result is that (e.g.) "chmod 2775 " doesn't do the expected -- the "2" is ignored. Apparently FreeBSD, HPUX, and Linux all do the expected thing, but Solaris (every version we found) doesn't. This is documented in the Solaris chmod(1) man page. If you use the GNU chmod program instead, it does pay attention to the SGID bit.

Date: 2006-03-23 09:19 pm (UTC)
From: [identity profile] yesthattom.livejournal.com
Thanks for the followup.

December 2015

S M T W T F S
  12345
6789 101112
13141516171819
202122 23242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 12th, 2026 12:11 pm
Powered by Dreamwidth Studios