<s>
In	O
Unix	B-Application
and	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
is	O
the	O
command	B-Application
and	O
system	B-Operating_System
call	I-Operating_System
used	O
to	O
change	O
the	O
access	O
permissions	O
and	O
the	O
special	O
mode	O
flags	O
(	O
the	O
setuid	O
,	O
setgid	O
,	O
and	O
sticky	B-Application
flags	O
)	O
of	O
file	B-Application
system	I-Application
objects	O
(	O
files	B-Operating_System
and	O
directories	B-Application
)	O
.	O
</s>
<s>
A	O
command	B-Application
first	O
appeared	O
in	O
AT&T	O
UNIX	B-Application
version	O
1	O
,	O
along	O
with	O
the	O
system	B-Operating_System
call	I-Operating_System
.	O
</s>
<s>
As	O
systems	O
grew	O
in	O
number	O
and	O
types	O
of	O
users	O
,	O
access-control	O
lists	O
were	O
added	O
to	O
many	O
file	B-Application
systems	I-Application
in	O
addition	O
to	O
these	O
most	O
basic	O
modes	O
to	O
increase	O
flexibility	O
.	O
</s>
<s>
The	O
version	O
of	O
bundled	O
in	O
GNU	B-Application
coreutils	I-Application
was	O
written	O
by	O
David	O
MacKenzie	O
and	O
Jim	O
Meyering	O
.	O
</s>
<s>
The	O
command	B-Application
is	O
available	O
as	O
a	O
separate	O
package	O
for	O
Microsoft	B-Application
Windows	I-Application
as	O
part	O
of	O
the	O
UnxUtils	B-Application
collection	O
of	O
native	B-Language
Win32	B-Library
ports	O
of	O
common	O
GNU	B-Operating_System
Unix-like	B-Operating_System
utilities	O
.	O
</s>
<s>
The	O
command	B-Application
has	O
also	O
been	O
ported	O
to	O
the	O
IBM	B-Application
i	I-Application
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
Throughout	O
this	O
section	O
,	O
ser	O
refers	O
to	O
the	O
owner	O
of	O
the	O
file	O
,	O
as	O
a	O
reminder	O
that	O
the	O
symbolic	O
form	O
of	O
the	O
command	B-Application
uses	O
"	O
u	O
"	O
.	O
</s>
<s>
chmod	B-Application
 [ options ] 	O
mode[,mode]	O
file1	O
[	O
file2	O
...	O
]	O
</s>
<s>
include	O
objects	O
in	O
subdirectories	B-Application
.	O
</s>
<s>
If	O
a	O
symbolic	B-Application
link	I-Application
is	O
specified	O
,	O
the	O
target	O
object	O
is	O
affected	O
.	O
</s>
<s>
File	O
modes	O
directly	O
associated	O
with	O
symbolic	B-Application
links	I-Application
themselves	O
are	O
typically	O
not	O
used	O
.	O
</s>
<s>
The	O
script	O
can	O
be	O
read	O
,	O
written	O
to	O
,	O
and	O
executed	O
by	O
the	O
user	O
;	O
read	O
and	O
executed	O
by	O
members	O
of	O
the	O
group	B-Application
;	O
and	O
only	O
read	O
by	O
any	O
other	O
users	O
.	O
</s>
<s>
Each	O
group	B-Application
of	O
three	O
characters	O
define	O
permissions	O
for	O
each	O
class	O
:	O
</s>
<s>
the	O
middle	O
three	O
characters	O
,	O
,	O
define	O
permissions	O
for	O
the	O
Group	B-Application
class	O
(	O
i.e.	O
</s>
<s>
In	O
this	O
example	O
,	O
users	O
who	O
are	O
not	O
the	O
owner	O
of	O
the	O
file	O
and	O
who	O
are	O
not	O
members	O
of	O
the	O
Group	B-Application
(	O
and	O
,	O
thus	O
,	O
are	O
in	O
the	O
Others	O
class	O
)	O
have	O
no	O
permission	O
to	O
access	O
the	O
file	O
.	O
</s>
<s>
The	O
three	O
rightmost	O
digits	O
define	O
permissions	O
for	O
the	O
file	O
user	O
,	O
the	O
group	B-Application
,	O
and	O
others	O
.	O
</s>
<s>
"	O
read	O
"	O
(	O
4	O
)	O
and	O
"	O
execute	O
"	O
(	O
1	O
)	O
for	O
the	O
Group	B-Application
class	O
;	O
i.e.	O
,	O
5	O
(	O
4	O
+	O
1	O
)	O
.	O
</s>
<s>
Change	O
permissions	O
to	O
permit	O
members	O
of	O
the	O
group	B-Application
to	O
update	O
a	O
file	O
:	O
</s>
<s>
The	O
command	B-Application
also	O
accepts	O
a	O
finer-grained	O
symbolic	O
notation	O
,	O
which	O
allows	O
modifying	O
specific	O
modes	O
while	O
leaving	O
other	O
modes	O
untouched	O
.	O
</s>
<s>
Mode	O
Name	O
Description	O
read	O
read	O
a	O
file	O
or	O
list	O
a	O
directory	B-Application
's	O
contents	O
write	O
write	O
to	O
a	O
file	O
or	O
directory	B-Application
execute	O
execute	O
a	O
file	O
or	O
recurse	O
a	O
directory	B-Application
tree	I-Application
special	O
execute	O
which	O
is	O
not	O
a	O
permission	O
in	O
itself	O
but	O
rather	O
can	O
be	O
used	O
instead	O
of	O
.	O
</s>
<s>
It	O
applies	O
execute	O
permissions	O
to	O
directories	B-Application
regardless	O
of	O
their	O
current	O
permissions	O
and	O
applies	O
execute	O
permissions	O
to	O
a	O
file	O
which	O
already	O
has	O
at	O
least	O
one	O
execute	O
permission	O
bit	O
already	O
set	O
(	O
either	O
User	O
,	O
Group	B-Application
or	O
Others	O
)	O
.	O
</s>
<s>
If	O
a	O
user	O
is	O
not	O
specified	O
,	O
chmod	B-Application
will	O
check	O
the	O
umask	O
and	O
the	O
effect	O
will	O
be	O
as	O
if	O
"	O
a	O
"	O
was	O
specified	O
except	O
bits	O
that	O
are	O
set	O
in	O
the	O
umask	O
are	O
not	O
affected	O
.	O
</s>
<s>
Add	O
write	O
permission	O
(	O
)	O
to	O
the	O
Group	B-Application
's	O
(	O
)	O
access	O
modes	O
of	O
a	O
directory	B-Application
,	O
allowing	O
users	O
in	O
the	O
same	O
group	B-Application
to	O
add	O
files	B-Operating_System
:	O
</s>
<s>
Set	O
the	O
permissions	O
for	O
the	O
ser	O
and	O
the	O
Group	B-Application
(	O
)	O
to	O
read	O
and	O
execute	O
(	O
)	O
only	O
(	O
no	O
write	O
permission	O
)	O
on	O
,	O
preventing	O
anyone	O
from	O
adding	O
files	B-Operating_System
.	O
</s>
<s>
Add	O
the	O
read	O
and	O
write	O
permissions	O
to	O
the	O
user	O
and	O
group	B-Application
classes	O
of	O
a	O
file	O
or	O
directory	B-Application
named	O
:	O
</s>
<s>
Change	O
the	O
permissions	O
for	O
the	O
user	O
and	O
the	O
group	B-Application
to	O
read	O
and	O
execute	O
only	O
(	O
no	O
write	O
permission	O
)	O
on	O
.	O
</s>
<s>
The	O
command	B-Application
is	O
also	O
capable	O
of	O
changing	O
the	O
additional	O
permissions	O
or	O
special	O
modes	O
of	O
a	O
file	O
or	O
directory	B-Application
.	O
</s>
<s>
The	O
symbolic	O
modes	O
use	O
''	O
to	O
represent	O
the	O
setuid	O
and	O
setgid	O
modes	O
,	O
and	O
''	O
to	O
represent	O
the	O
sticky	B-Application
mode	O
.	O
</s>
<s>
Most	O
operating	B-General_Concept
systems	I-General_Concept
support	O
the	O
specification	O
of	O
special	O
modes	O
numerically	O
,	O
particularly	O
in	O
octal	O
,	O
but	O
some	O
do	O
not	O
.	O
</s>
<s>
Command	B-Application
Explanation	O
chmod	B-Application
a+r	O
publicComments.txt	O
adds	O
read	O
permission	O
for	O
all	O
classes	O
(	O
i.e.	O
</s>
<s>
ser	O
,	O
Group	B-Application
and	O
Others	O
)	O
chmod	B-Application
a-x	O
publicComments.txt	O
removes	O
execute	O
permission	O
for	O
all	O
classes	O
chmod	B-Application
a+rx	O
viewer.sh	O
adds	O
read	O
and	O
execute	O
permissions	O
for	O
all	O
classes	O
chmod	B-Application
u	O
=	O
rw	O
,	O
g	O
=	O
r	O
,	O
o	O
=	O
internalPlan.txt	O
sets	O
read	O
and	O
write	O
permission	O
for	O
ser	O
,	O
sets	O
read	O
for	O
Group	B-Application
,	O
and	O
denies	O
access	O
for	O
Others	O
chmod	B-Application
-R	O
u+w	O
,	O
go-w	O
docs	O
adds	O
write	O
permission	O
to	O
the	O
directory	B-Application
docs	O
and	O
all	O
its	O
contents	O
(	O
i.e.	O
</s>
<s>
Recursively	O
)	O
for	O
owner	O
,	O
and	O
removes	O
write	O
permission	O
for	O
group	B-Application
and	O
others	O
chmod	B-Application
ug	O
=	O
rw	O
groupAgreements.txt	O
sets	O
read	O
and	O
write	O
permissions	O
for	O
ser	O
and	O
Group	B-Application
chmod	B-Application
664	O
global.txt	O
sets	O
read	O
and	O
write	O
permissions	O
for	O
ser	O
and	O
Group	B-Application
,	O
and	O
provides	O
read	O
to	O
Others	O
.	O
</s>
<s>
chmod	B-Application
744	O
Show_myCV.sh	O
sets	O
read	O
,	O
write	O
,	O
and	O
execute	O
permissions	O
for	O
ser	O
,	O
and	O
sets	O
read	O
permission	O
for	O
Group	B-Application
and	O
Others	O
chmod	B-Application
1755	O
findReslts.sh	O
sets	O
sticky	B-Application
bit	I-Application
,	O
sets	O
read	O
,	O
write	O
,	O
and	O
execute	O
permissions	O
for	O
owner	O
,	O
and	O
sets	O
read	O
and	O
execute	O
permissions	O
for	O
group	B-Application
and	O
others	O
(	O
this	O
suggests	O
that	O
the	O
script	O
be	O
retained	O
in	O
memory	O
)	O
chmod	B-Application
4755	O
setCtrls.sh	O
sets	O
UID	O
,	O
sets	O
read	O
,	O
write	O
,	O
and	O
execute	O
permissions	O
for	O
ser	O
,	O
and	O
sets	O
read	O
and	O
execute	O
permissions	O
for	O
Group	B-Application
and	O
Others	O
chmod	B-Application
2755	O
setCtrls.sh	O
sets	O
GID	O
,	O
sets	O
read	O
,	O
write	O
,	O
and	O
execute	O
permissions	O
for	O
ser	O
,	O
and	O
sets	O
read	O
and	O
execute	O
permissions	O
for	O
Group	B-Application
and	O
Others	O
chmod	B-Application
-R	O
u+rwX	O
,	O
g-rwx	O
,	O
o-rx	O
personalStuff	O
Recursively	O
(	O
i.e.	O
</s>
<s>
on	O
all	O
files	B-Operating_System
and	O
directories	B-Application
in	O
personalStuff	O
)	O
adds	O
read	O
,	O
write	O
,	O
and	O
special	O
execution	O
permissions	O
for	O
ser	O
,	O
removes	O
read	O
,	O
write	O
,	O
and	O
execution	O
permissions	O
for	O
Group	B-Application
,	O
and	O
removes	O
read	O
and	O
execution	O
permissions	O
for	O
Others	O
chmod	B-Application
-R	O
a-x	O
+X	O
publicDocs	O
Recursively	O
(	O
i.e.	O
</s>
