| Summary: | /usr/bin/chmod +t and /usr/bin/chmod +s have no effect | ||
|---|---|---|---|
| Product: | Base System | Reporter: | vladimir <vladimir> |
| Component: | bin | Assignee: | ru <ru> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.3-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
vladimir
1999-09-22 05:10:01 UTC
On Wed, Sep 22, 1999 at 04:01:39AM -0000, vladimir@math.uic.edu wrote: > > >Description: > > /usr/bin/chmod +t filename and /usr/bin/chmod +s filename have no effect > on the file permission and do not give any error messages. I believe > the effect should be setting the sticky bit and setuid bit on the file > mode resp. > > >How-To-Repeat: > > >touch /tmp/file > >ls -l /tmp/file > -rw-r--r-- 1 vladimir wheel 0 Sep 21 22:59 /tmp/file > >chmod +t /tmp/file > >ls -l /tmp/file > -rw-r--r-- 1 vladimir wheel 0 Sep 21 22:59 /tmp/file > The sticky bit is ignored for regular files, see sticky(8) and chmod(2). To set set-user-ID or set-group-ID on a file: $ touch /tmp/file $ ls -l /tmp/file -rw-r--r-- 1 ru wheel 0 Sep 22 10:32 /tmp/file $ chmod u+s /tmp/file $ ls -l /tmp/file -rwSr--r-- 1 ru wheel 0 Sep 22 10:32 /tmp/file $ chmod g+s /tmp/file $ ls -l /tmp/file -rwSr-Sr-- 1 ru wheel 0 Sep 22 10:32 /tmp/file $ chmod ug+x /tmp/file $ ls -l /tmp/file -rwsr-sr-- 1 ru wheel 0 Sep 22 10:32 /tmp/file Can I close this PR? Cheers, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age State Changed From-To: open->feedback Fixed in -current, in src/lib/libc/gen/setmode.c,v 1.4 Responsible Changed From-To: freebsd-bugs->ru So I remember to MFC. State Changed From-To: feedback->closed Fixed in -stable, in src/lib/libc/gen/setmode.c,v 1.3.4.1 |