08-22-2002
Also check out the man chmod manpage. It gives a full explanation of various bit settings.
Miscellaneous mode bits:
4000 (= u=s) Set user ID on file execution (file only)
2000 (= g=s) Set group ID on file execution (file only)
1000 (= u=t) Set sticky bit; see below and chmod(2)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a questions, whose answer may be very obvious:
Of what use is the sticky-bit permission on a Unix system?
I have looked at the chmod(1) man page on our HP-UX playground
system, and haven't been given much explanation:
Add or delete the save-text-image-on-file-
execution (sticky... (3 Replies)
Discussion started by: LivinFree
3 Replies
2. UNIX for Dummies Questions & Answers
I have a script that I want to be able to let user 'wcs1234' execute it, but when it runs, it will do so under the higher authority of 'cdunix'. It is my understanding that I accomplish this with a sticky bit. I have tried every variation of this but am unable to get this to work.
my script is... (2 Replies)
Discussion started by: hedrict
2 Replies
3. UNIX for Dummies Questions & Answers
I have the sticky bit set on my /tmp directory, but users are still able to remove files that are not owned by them. Does the /etc/group file get invloved in securing these files ?? (1 Reply)
Discussion started by: rob11g
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
could anyone please send me a link to learn/ know more about sticky bits? I am still not clear on the application of using a sticky bits.
Thanks for your help.
Regards,
UP (3 Replies)
Discussion started by: teenu18
3 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
I am having file permision as
drwxrwsr_x
I kwo for deleting a file in the diretory i need w permsion as well ..
Say if i am having the permsion as
drwxrwsrwx - wil any one can delete the files in the directory ..
And one more question what is the s doing there ..... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
6. UNIX for Dummies Questions & Answers
HI
What is sticky bit?
how can be see if the sticky bit for file is set?
WHat is meaning of sticky bit set on Directory?
What is the syntax to set the sticky bit? With example
Thanks (10 Replies)
Discussion started by: skyineyes
10 Replies
7. UNIX for Advanced & Expert Users
Hi,
I understand the purpose of sticky bit on directories. But I am not very clear about what the sticky bit do on a file.
Can any one explain me in detail and with example please.
Thanks in advance. (1 Reply)
Discussion started by: praveen_b744
1 Replies
8. Shell Programming and Scripting
I want a file I create to not be deletable by other users so I created a sticky bit by chmod 1644 on the file. chown'd it to root and then tried to delete (via GUI drag to trash and empty) as a non root user and it let me. is sticky bit only good for terminal deletes or something? (4 Replies)
Discussion started by: glev2005
4 Replies
9. AIX
What is sticky bit ...and where we aill use this.. how to set this bit in files and directories (1 Reply)
Discussion started by: udtyuvaraj
1 Replies
10. AIX
as far as i understand, if sticky bit is set on a directory, the files created under tht directory cannot be deleted by ordinary user...
but we can do ths by permission itself,,, tht's assign only read permission to tht dirrectory
wht 's the difference? (1 Reply)
Discussion started by: udtyuvaraj
1 Replies
LEARN ABOUT OPENSOLARIS
fpgetmask
fpgetround(3C) Standard C Library Functions fpgetround(3C)
NAME
fpgetround, fpsetround, fpgetmask, fpsetmask, fpgetsticky, fpsetsticky - IEEE floating-point environment control
SYNOPSIS
#include <ieeefp.h>
fp_rnd fpgetround(void);
fp_rnd fpsetround(fp_rnd rnd_dir);
fp_except fpgetmask(void);
fp_except fpsetmask(fp_except mask);
fp_except fpgetsticky(void);
fp_except fpsetsticky(fp_except sticky);
DESCRIPTION
There are five floating-point exceptions:
o divide-by-zero,
o overflow,
o underflow,
o imprecise (inexact) result, and
o invalid operation.
When a floating-point exception occurs, the corresponding sticky bit is set(1), and if the mask bit is enabled(1), the trap takes place.
These routines let the user change the behavior on occurrence of any of these exceptions, as well as change the rounding mode for floating-
point operations.
The mask argument is formed by the logical OR operation of the following floating-point exception masks:
FP_X_INV /* invalid operation exception */
FP_X_OFL /* overflow exception */
FP_X_UFL /* underflow exception */
FP_X_DZ /* divide-by-zero exception */
FP_X_IMP /* imprecise (loss of precision) */
The following floating-point rounding modes are passed to fpsetround and returned by fpgetround().
FP_RN /* round to nearest representative number */
FP_RP /* round to plus infinity */
FP_RM /* round to minus infinity */
FP_RZ /* round to zero (truncate) */
The default environment is rounding mode set to nearest (FP_RN) and all traps disabled.
The fpsetsticky() function modifies all sticky flags. The fpsetmask() function changes all mask bits. The fpsetmask() function clears the
sticky bit corresponding to any exception being enabled.
RETURN VALUES
The fpgetround() function returns the current rounding mode.
The fpsetround() function sets the rounding mode and returns the previous rounding mode.
The fpgetmask() function returns the current exception masks.
The fpsetmask() function sets the exception masks and returns the previous setting.
The fpgetsticky() function returns the current exception sticky flags.
The fpsetsticky() function sets (clears) the exception sticky flags and returns the previous setting.
USAGE
The C programming language requires truncation (round to zero) for floating point to integral conversions. The current rounding mode has no
effect on these conversions.
The sticky bit must be cleared to recover from the trap and proceed. If the sticky bit is not cleared before the next trap occurs, a
wrong exception type may be signaled.
Individual bits may be examined using the constants defined in <ieeefp.h>.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
isnand(3C), attributes(5)
SunOS 5.11 29 Dec 1996 fpgetround(3C)