Sticky bit - HPUX
If the sticky bit is set on a directory then files inside the dir will be renamed/removed only by owner of the file; the owner of the dir or the superuser.
The classic example is /tmp.
$ ls -ld /tmp
drwxrwxrwt 25 bin bin 16384 Dec 3 09:54 /tmp
How to set sticky bit:
$ ls -ld learn
drwx------ 2 kiran users 96 Dec 3 10:03 learn
$ chmod +t learn
or
$ chmod 1700 learn
$ ls -ld learn
drwx-----T 2 kiran users 96 Dec 3 10:03 learn
How to unset sticky bit:
$ chmod -t learn
or
$ chmod 0700 learn
if 4000 = set uid ---> directories with set Gid permission will force all files and sub-directories created in them to be owned by the directory group and not the group of the user creating the
file.
2000 = set Gid --> setuid permission set on a directory is ignored on UNIX. Set UID allows an executable to be run with the privilages of the executables owner.
If the sticky bit is set on a directory then files inside the dir will be renamed/removed only by owner of the file; the owner of the dir or the superuser.
The classic example is /tmp.
$ ls -ld /tmp
drwxrwxrwt 25 bin bin 16384 Dec 3 09:54 /tmp
How to set sticky bit:
$ ls -ld learn
drwx------ 2 kiran users 96 Dec 3 10:03 learn
$ chmod +t learn
or
$ chmod 1700 learn
$ ls -ld learn
drwx-----T 2 kiran users 96 Dec 3 10:03 learn
How to unset sticky bit:
$ chmod -t learn
or
$ chmod 0700 learn
if 4000 = set uid ---> directories with set Gid permission will force all files and sub-directories created in them to be owned by the directory group and not the group of the user creating the
file.
2000 = set Gid --> setuid permission set on a directory is ignored on UNIX. Set UID allows an executable to be run with the privilages of the executables owner.
Thanks...
Kiran Jadhav
**Let's Share our knowledge and keep visiting here**
No comments:
Post a Comment