⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chmod.2

📁 操作系统设计与实现源码
💻 2
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:05:35 1996%%Pages: (atend)%%DocumentFonts: (atend)/devps 180 dict def devps begin/res 10.000000 def/y_offset 843 def/X{exch}bind def/mm {transform round X round X itransform} bind def/r{rmoveto}bind def/m{moveto}bind def/l{lineto}bind def/rl{rlineto}bind def/st{stroke}bind def/gs{gsave}bind def/gr{grestore}bind def/cp{currentpoint}bind def/np{newpath}bind def/ct{curveto}bind defsystemdict /setpacking known { /savepacking currentpacking def true setpacking } if/m0{0 0 moveto}bind def/xc{//res div}bind def/yc{//res neg div //y_offset add}bind def/lc{yc X xc X l st}bind def/mc{yc X xc X m}bind def/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def/V{//res neg div //y_offset addcurrentpoint pop Xm}bind def/H{//res div0 transform X round X itransform popcurrentpoint X popmoveto}bind def/h{//res div 0 r}bind def/v{//res neg div 0 X r}bind def/S{X H show}bind def/A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def/psize 10 def/height 0 def/cheight { height 0 ne { height } { psize } ifelse } bind def/slant 0 def/FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def    [psize 0 cheight slant sin slant cos div mul cheight 0 0]    makefont setfont}bind def/shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fillgr}bind def1 setlinecap/resolution res 72 mul def/startFig {	/SavedState save def	userdict maxlength dict begin	currentpoint transform	DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap		setlinewidth setmatrix	itransform moveto	/ury exch def	/urx exch def	/lly exch def	/llx exch def	/y exch 72 mul resolution div def	/x exch 72 mul resolution div def		currentpoint /cy exch def /cx exch def	/sx x urx llx sub div def	/sy y ury lly sub div def	sx sy scale	cx sx div llx sub	cy sy div ury sub translate		/DefFigCTM matrix currentmatrix def	/initmatrix {		DefFigCTM setmatrix	} def	/defaultmatrix {		DefFigCTM exch copy	} def	/initgraphics {		DocumentInitState setmiterlimit setgray setdash 			setlinejoin setlinecap setlinewidth setmatrix		DefFigCTM setmatrix	} def	/showpage {		initgraphics	} def}bind  def/clipFig {	currentpoint 6 2 roll	newpath 4 copy	4 2 roll moveto	6 -1 roll exch lineto	exch lineto	exch lineto	closepath clip	newpath	moveto}bind  def/doclip { llx lly urx ury clipFig } def/endFig {	end SavedState restore}bind  def/globalstart {	fontnum psize slant height resolution currentpoint 	pagesave restore gsave }bind  def/globalend {	grestore moveto	/resolution exch def /height exch def	/slant exch def /psize exch def /fontnum exch def	F	/pagesave save def}bind  def/fontnum 1 def systemdict /setpacking known { savepacking setpacking} ifend/BP{save mark devps begin m0/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecapcurrentlinejoin currentdash currentgray currentmiterlimit ] cvx def}bind def/EP{end cleartomark restore showpage}def/Encoding-1 256 array def0 1 255 {Encoding-1 exch /.notdef put} forEncoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-BEncoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-bEncoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accentsEncoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessiEncoding-1dup 8#41 /copyright putdup 8#42 /registered putdup 8#43 /trademark putdup 8#44 /logicalnot putdup 8#45 /Eth putdup 8#46 /eth putdup 8#47 /Thorn putdup 8#50 /thorn putdup 8#51 /brokenbar putdup 8#52 /degree putdup 8#53 /divide putdup 8#54 /multiply putdup 8#55 /minus putdup 8#56 /onehalf putdup 8#57 /onequarter putdup 8#60 /threequarters putdup 8#101 /Aacute putdup 8#102 /Acircumflex putdup 8#103 /Adieresis putdup 8#104 /Agrave putdup 8#105 /Aring putdup 8#106 /Atilde putdup 8#107 /Ccedilla putdup 8#110 /Eacute putdup 8#111 /Ecircumflex putdup 8#112 /Edieresis putdup 8#113 /Egrave putdup 8#114 /Iacute putdup 8#115 /Icircumflex putdup 8#116 /Idieresis putdup 8#117 /Igrave putdup 8#120 /Ntilde putdup 8#121 /Oacute putdup 8#122 /Ocircumflex putdup 8#123 /Odieresis putdup 8#124 /Ograve putdup 8#125 /Otilde putdup 8#126 /Scaron putdup 8#127 /Uacute putdup 8#130 /Ucircumflex putdup 8#131 /Udieresis putdup 8#132 /Ugrave putdup 8#133 /Ydieresis putdup 8#134 /Zcaron putdup 8#135 /aacute putdup 8#136 /acircumflex putdup 8#137 /adieresis putdup 8#140 /agrave putdup 8#141 /aring putdup 8#142 /atilde putdup 8#143 /ccedilla putdup 8#144 /eacute putdup 8#145 /ecircumflex putdup 8#146 /edieresis putdup 8#147 /egrave putdup 8#150 /iacute putdup 8#151 /icircumflex putdup 8#152 /idieresis putdup 8#153 /igrave putdup 8#154 /ntilde putdup 8#155 /oacute putdup 8#156 /ocircumflex putdup 8#157 /odieresis putdup 8#160 /ograve putdup 8#161 /otilde putdup 8#162 /scaron putdup 8#163 /uacute putdup 8#164 /ucircumflex putdup 8#165 /udieresis putdup 8#166 /ugrave putdup 8#167 /ydieresis putdup 8#170 /zcaron putpop/Enc-dict 30 dict defEnc-dict /tmpstr1 50 string putEnc-dict /tmpstr2 50 string putEnc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put/AEnc-def { % arguments: the original font's name, encoding nrEnc-dict begintmpstr2 cvs /Enc-no exch def % Remember the number in a stringdup /OrigName exch def % remember the namefindfont dup maxlength dict /newdict exch def % get dictionary for new font{ exch dup /FID ne   { exch newdict 3 1 roll put }   { pop pop } % Ignore FID   ifelse} forallnewdict begin/Encoding  tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval  cvn load  def % Replace encodingcurrentdict /UniqueID known{ /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueIDend % newdict/FNlength OrigName tmpstr1 cvs length def % convert name, remember lengthFNlength 1 add Enc-no length add stringdup 0 OrigName tmpstr1 cvs putintervaldup FNlength (-) putintervaldup FNlength 1 add Enc-no putintervaldup 0 tmpstr1 0 FNlength getinterval putinterval % Add old namecvn dup newdict /FontName 3 2 roll put newdict definefontend % Enc-dict} def/Times-Roman 1 AEnc-def pop/R-1{/Times-Roman-1 FF}def/R{/Times-Roman FF}def/B{/Times-Bold FF}def/I{/Times-Italic FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(CHMOD)S1103(\()S1145(2)S1203(\))S2696(Eighth)S(Edition)296 2989 A4744(CHMOD)S5127(\()S5169(2)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(chmod)S10 R-11378(-)S10 R1460(change)S1770(mode)S2018(of)S2127(\256le)S1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 B1080(#include)S1482(<sys/types.h>)S1488 V1080(#include)S1482(<sys/stat.h>)S1728 V1080(int)S1236(chmod\(const)S1823(char)S2057(*)S10 I2107(path)S10 B2285(,)S2348(mode_t)S10 I2705(mode)S10 B2923(\))S1896 V9 R720(D)S722(DE)S790(ES)S848(SC)S900(CR)S962(RI)S1024(IP)S1057(PT)S1109(TI)S1167(IO)S1200(ON)S1268(N)S2016 V10 R1080(The)S1264(\256le)S1420(whose)S1704(name)S1949(is)S2043(given)S2293(by)S10 I2420(path)S10 R2625(has)S2786(its)S2908(mode)S3158(changed)S3520(to)S10 I3625(mode)S10 R3851(.)S3929(Modes)S4230(are)S4382(constructed)S4874(by)S10 I5002(or)S10 R5099('ing)S2136 V1080(together)S1435(some)S1672(combination)S2199(of)S2308(the)S2456(following,)S2897(de\256ned)S3218(in)S10 I3321(<sys/stat.h>)S10 R3836(:)S2304 V1440(S_ISUID)S(04000)250 1866 A2191(set)S2328(user)S2521(ID)S2653(on)S2778(execution)S2424 V1440(S_ISGID)S(02000)250 1866 A2191(set)S(group)234 2328 A2587(ID)S2719(on)S2844(execution)S2544 V1440(S_ISVTX)S(01000)250 1866 A2191(`sticky)S2490(bit')S2655(\(see)S2843(below\))S2664 V1440(S_IRWXU)S(00700read,)449 2191 A2665(write,)S2923(execute)S3256(by)S3381(owner)S2784 V1440(S_IRUSR)S(00400)250 1866 A2191(read)S2390(by)S2515(owner)S2904 V1440(S_IWUSR)S(00200write)458 2191 A2674(by)S2799(owner)S3024 V1440(S_IXUSR)S(00100)250 1866 A2191(execute)S2524(\(search)S2841(on)S2966(directory\))S3389(by)S3514(owner)S3144 V1440(S_IRWXG)S(00070read,)449 2191 A2665(write,)S2923(execute)S3256(by)S(group)234 3381 A3264 V1440(S_IRGRP)S(00040)250 1866 A2191(read)S2390(by)S(group)234 2515 A3384 V1440(S_IWGRP)S(00020write)458 2191 A2674(by)S(group)234 2799 A3504 V1440(S_IXGRP)S(00010)250 1866 A2191(execute)S2524(\(search)S2841(on)S2966(directory\))S3389(by)S(group)234 3514 A3624 V1440(S_IRWXO)S(00007read,)449 2191 A2665(write,)S2923(execute)S3256(by)S3381(others)S3744 V1440(S_IROTH)S(00004)250 1866 A2191(read)S2390(by)S2515(others)S3864 V1440(S_IWOTH)S(00002write)458 2191 A2674(by)S2799(others)S3984 V1440(S_IXOTH)S(00001)250 1866 A2191(execute)S2524(\(search)S2841(on)S2966(directory\))S3389(by)S3514(others)S4152 V1080(If)S1180(mode)S1435(ISVTX)S1765(\(the)S1954(`sticky)S2260(bit'\))S2466(is)S2565(set)S2709(on)S2841(a)S2918(directory,)S3339(an)S(unprivileged)508 3466 A4006(user)S4206(may)S4412(not)S4573(delete)S4847(or)S4964(rename)S4272 V1080(\256les)S1273(of)S1382(other)S1614(users)S1846(in)S1949(that)S2125(directory.)S2564(\(Minix-vmd\))S4440 V1080(Only)S1306(the)S1454(owner)S1731(of)S1840(a)S1910(\256le)S2064(\(or)S2207(the)S2355(super-user\))S2834(may)S3032(change)S3342(the)S3490(mode.)S4608 V(Writing)313 1080 A1422(or)S1535(changing)S1932(the)S2084(owner)S2365(of)S2478(a)S2552(\256le)S2710(turns)S2940(off)S3087(the)S3239(set-user-id)S3694(and)S(set-group-id)492 3868 A4389(bits)S4563(unless)S4843(the)S4996(user)S5194(is)S4728 V1080(the)S1235(super-user.)S1737(This)S1948(makes)S2237(the)S2392(system)S2703(somewhat)S3143(more)S3382(secure)S3672(by)S3804(protecting)S4244(set-user-id)S(\(set-group-id\))560 4701 A4848 V1080(\256les)S1277(from)S1502(remaining)S1939(set-user-id)S(\(set-group-id\))560 2394 A2983(if)S3074(they)S3276(are)S3430(modi\256ed,)S3842(at)S3945(the)S4098(expense)S4452(of)S4566(a)S4641(degree)S4940(of)S5054(com-)S4968 V(patibility.)388 1080 A5136 V9 R720(R)S722(RE)S784(ET)S842(TU)S900(UR)S968(RN)S1030(N)S1121(V)S1123(VA)S1191(AL)S1259(LU)S1317(UE)S1385(E)S5256 V10 R(Upon)223 1080 A(successful)414 1328 A1768(completion,)S2271(a)S2342(value)S2586(of)S2696(0)S2772(is)S2865(returned.)S3277(Otherwise,)S3743(a)S3814(value)S4058(of)S10 R-14168(-)S10 R4225(1)S4301(is)S4394(returned)S4756(and)S10 B(errno)241 4927 A10 R5194(is)S5376 V1080(set)S1217(to)S1320(indicate)S1664(the)S1812(error.)S5544 V9 R720(E)S722(ER)S780(RR)S842(RO)S904(OR)S972(RS)S1034(S)S5664 V10 B1080(Chmod)S10 R(will)157 1424 A1606(fail)S1766(and)S1936(the)S2084(\256le)S2238(mode)S(will)157 2486 A2668(be)S2788(unchanged)S3248(if:)S5832 V1080([ENOTDIR])S1830(A)S(component)446 1928 A2399(of)S2508(the)S2656(path)S2854(pre\256x)S3114(is)S3206(not)S3359(a)S3429(directory.)S6000 V([ENAMETOOLONG])916 1080 A6120 V1830(The)S2012(path)S2210(name)S(exceeds)319 2453 A2797(PATH_MAX)S3371(characters.)S6288 V1080([ENOENT])S1830(The)S2012(named)S2305(\256le)S2459(does)S2668(not)S2821(exist.)S6456 V1080([EACCES])S1830(Search)S2130(permission)S2596(is)S2688(denied)S2981(for)S3124(a)S(component)446 3194 A3665(of)S3774(the)S3922(path)S4120(pre\256x.)S6624 V1080([ELOOP])S1830(Too)S2033(many)S2297(symbolic)S2706(links)S2942(were)S(encountered)492 3180 A3713(in)S3833(translating)S4300(the)S4465(pathname.)S4948(\(Minix-)S6744 V1830(vmd\))S6912 V1080([EPERM])S1830(The)S2016(effective)S2400(user)S2598(ID)S2735(does)S2949(not)S3107(match)S3383(the)S3536(owner)S3818(of)S3932(the)S4085(\256le)S4244(and)S4419(the)S4572(effective)S4956(user)S5154(ID)S7032 V1830(is)S1922(not)S2075(the)S2223(super-user.)S7200 V1080([EROFS])S1830(The)S2012(named)S2305(\256le)S2459(resides)S2764(on)S2889(a)S2959(read-only)S3370(\256le)S3524(system.)S7368 V1080([EFAULT])S10 I1830(Path)S10 R2045(points)S2315(outside)S2630(the)S2778(process's)S3178(allocated)S3567(address)S(space.)249 3894 A7903 V720(Page)S941(1)S2669(\()S2711(May)S2920(13,)S(1986)200 3070 A3278(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R720(CHMOD)S1103(\()S1145(2)S1203(\))S2696(Eighth)S(Edition)296 2989 A4744(CHMOD)S5127(\()S5169(2)S5227(\))S960 V1080([EIO])S1830(An)S1978(I/O)S2138(error)S2360(occurred)S2738(while)S2987(reading)S3314(from)S3535(or)S(writing)291 3644 A3960(to)S4063(the)S4211(\256le)S4365(system.)S1128 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S1248 V10 B1080(chmod)S10 R1371(\(1\),)S10 B1539(open)S10 R1746(\(2\),)S10 B1914(chown)S10 R2194(\(2\),)S10 B2362(stat)S10 R2519(\(2\).)S1416 V9 R720(N)S722(NO)S790(OT)S858(TE)S916(ES)S974(S)S1536 V10 R1080(The)S1262(sticky)S1527(bit)S1658(was)S1840(historically)S2318(used)S2527(to)S2630(lock)S2828(important)S3244(executables)S3739(into)S3920(memory.)S7903 V720(September)S1176(13,)S(1996)200 1326 A2669(\()S2711(May)S2920(13,)S(1986)200 3070 A3278(\))S4990(Page)S5211(2)S8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 2

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -