1820485 Members
2446 Online
109624 Solutions
New Discussion юеВ

What is: chmod a+rwx,+t

 
SOLVED
Go to solution
Manuales
Super Advisor

What is: chmod a+rwx,+t

Hi ..
what is the meaning of:

chmod a+rwx,+t

please, tell me as follows:

rwx-rwx-rwx or rw-rw-rw ... what ever.

Thanks...
11 REPLIES 11
Jeff Schussele
Honored Contributor
Solution

Re: What is: chmod a+rwx,+t

Hi,

It sets read/write/executable for *all* users as well as setting the save-text-image-on-file-execution permission - otherwise known as "sticky-bit".
This allows faster re-execution of frequently run commands.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Zinky
Honored Contributor

Re: What is: chmod a+rwx,+t

It means the filesystem will be world writable/redable but with sticky bit on.

Only the file/dir owners will be able to modify, overwrite or delete the files.
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Pete Randall
Outstanding Contributor

Re: What is: chmod a+rwx,+t

The t sets the sticky bit, which does not show up in the permissions:

$ mkdir sticky
$ ll -d sticky
drwxrwxr-x 2 plr support 96 Mar 1 10:32 sticky
$ chmod u-t sticky
$ ll -d sticky
drwxrwxr-x 2 plr support 96 Mar 1 10:32 sticky

From the man page for chmod:

"If the sticky bit is set on a directory, files inside the directory may be renamed or removed only by the owner of the file, the owner of the directory, or the superuser (even if the modes of the directory would otherwise allow such an operation).


Pete

Pete
Arunvijai_4
Honored Contributor

Re: What is: chmod a+rwx,+t

Hi Manuales,

+t stands for "Sticky bit". You can find more information about "sticky bit" here,

http://www.faqs.org/faqs/hp/hpux-faq/section-70.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Kent Ostby
Honored Contributor

Re: What is: chmod a+rwx,+t

$ chmod 000 useme
$ ll useme
---------- 1 kmo users 0 Mar 1 10:34 useme
$ chmod a+rwx,+t useme
$ ll useme
-rwxrwxrwx 1 kmo users 0 Mar 1 10:34 useme*
atasw01:home/kmo $
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Peter Godron
Honored Contributor

Re: What is: chmod a+rwx,+t

Manuales,
from man chmod:
" Add or delete the save-text-image-on-file-
execution (sticky bit) permission."
James R. Ferguson
Acclaimed Contributor

Re: What is: chmod a+rwx,+t

Hi Manuales:

The manpages for 'chmod(1)' tell you the answer.

The "a" says to set the permissions or +rwx (read, write, execute) for *a*ll or for the owner, group and world. The 't' sets the so-called "sticky-bit".

If the sticky bit is set for a directory, then the directory's files can only be renamed or removed by the owner of the file, the owner of the directory, or by root.

If the sticky bit is set for an executable file, then the text (code) of the executable remains in memory for subsequent executions. This may make process startup for the executable faster.

Regards!

...JRF...
Manuales
Super Advisor

Re: What is: chmod a+rwx,+t

and ...
what is chmod u+s ??

and chmod o-rwx ?
Geoff Wild
Honored Contributor

Re: What is: chmod a+rwx,+t

chmod u+s - Add the set-owner-ID-on-file- execution

chmod o-rwx - take away read/write/execute for others (world).

man chmod will give you all of this. :)

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Arunvijai_4
Honored Contributor

Re: What is: chmod a+rwx,+t

Hello,

and ...
what is chmod u+s ??

Set UID, A good reading

http://catcode.com/teachmod/setuid.html

and chmod o-rwx ?

It takes out all permissions from Others.
http://grouchy.cs.indiana.edu/usr/local/www/linux/gs/subsection2.6.14.4.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Manuales
Super Advisor

Re: What is: chmod a+rwx,+t

THANKS ALL .....

:0)

Manuales.