106 lines · 1.3 KB · Text
RawDownload
.TH CHMOD 1 .SH NAMEchmod \- change mode.SH SYNOPSIS.B chmod.I mode file ....SH DESCRIPTIONThe mode ofeach named fileis changedaccording to.IR mode,which may be an octal number or a symbolic change to the existing mode.A.I modeis an octalnumber constructedfrom the OR of thefollowing modes..TF 0000.TP0400read by owner.TP0200write by owner.TP0100execute (search in directory) by owner.TP0070read, write, execute (search) by group.TP0007read, write, execute (search) by others.PD.PPA symbolic.I modehas the form:.IP.RI [who].I op permission.PPThe.I whopart is a combinationof the letters .B u(for user's permissions),.B g(group)and.B o(other).The letter.B astands for.BR ugo .If.I whois omitted,the default is.BR a ..PP.I Opcan be.B +to add.I permissionto the file's mode,.B -to take away.IR permission ,and.B =to assign.I permissionabsolutely(all other bits willbe reset)..PP.I Permissionis any combination of the letters.B r(read),.B w(write),.B x(execute),.B a(append only),.B l(exclusive access),and.B t(temporary file)..PPOnly the owner of a file or the group leader of its groupmay change the file's mode..SH SOURCE.B /sys/src/cmd/chmod.c.SH "SEE ALSO".IR ls (1),.IR stat (2),.IR stat (5)