什么是cp| 猫传腹是什么| 令人发指是什么意思| 裹腹是什么意思| 窦性心律t波改变是什么意思| 什么情况下吃救心丸| 四肢发麻是什么原因| 男人眉骨高代表什么| ca19-9偏高是什么意思| 腰扭了挂什么科| 女性为什么会感染hpv| 95年猪五行属什么| 咳嗽恶心干呕是什么原因引起的| ap是什么| 黑豆有什么功效| 无缘无故头疼是什么原因| 裸官是什么意思| 女人吃什么补充胶原蛋白| 什么菜不能吃| 作灶是什么意思| 吃了虾不能吃什么水果| 血干了是什么颜色| 御史相当于现在什么官| 老人头发由白变黑是什么原因| 身上肉疼是什么原因| 尖锐湿疣挂什么科| 人为什么会中暑| 幽门螺旋杆菌做什么检查| 什么的照射| 脚臭用什么泡脚效果好| 什么样的脚好看| 望子成龙是什么意思| 什么动物没有耳朵| cm是什么意思| 来大姨妈喝什么最好| 双向转诊是什么意思| 情人节什么时候| 尿黄是什么病| raf是什么意思| 炉鼎是什么意思| 纤维是什么| 低聚木糖是什么| 闰六月是什么意思| 芹菜什么时候种植| 吴京为什么看上谢楠| egfr是什么意思| 皮肤爱出油是什么原因| showroom是什么意思| 吃什么减肥| 巴西货币叫什么| 水红色是什么颜色| 光年是什么单位| 呆小症是缺乏什么激素| 暖气是什么意思| 什么炎炎| 副县长是什么级别| 碳水化合物是什么食物| 甲状腺1度肿大是什么意思| 无极是什么意思| 季字五行属什么| 医生为为什么建议不吃生菜| 干涸是什么意思| 体积是什么| 腰果不能和什么一起吃| 葵花宝典是什么意思| 眼睛不好吃什么补眼睛| 无名指为什么叫无名指| 屮艸芔茻什么意思| 月经颜色发黑是什么原因| 手气是什么原因引起的| 具体是什么意思| 秦始皇是什么民族| 什么是手性碳原子| 夫妻宫是什么意思| 宝宝支气管炎吃什么药| 耳朵不舒服是什么原因| 流清鼻涕吃什么药| 囊肿有什么症状| 移植后吃什么水果好| 一个口一个坐念什么| 什么是粘胶纤维| 化验血挂什么科| 甘之如饴是什么意思| 四川人喜欢吃什么| 芦荟有什么作用| 肌钙蛋白高是什么意思| 一什么毛巾| 切除甲状腺有什么影响| 巴沙鱼是什么鱼| 有什么无什么的成语| 100岁是什么之年| sneakers是什么意思| 小李子为什么叫小李子| 钝角是什么意思| 备孕吃什么药| 是谁在敲打我窗是什么歌| 减肥适合吃什么主食| 梦见长大水是什么意思| 幻听是什么原因| 口扫是什么| 右肾钙化灶是什么意思| 杨梅不能和什么一起吃| 治痛风吃什么药| 为什么会莫名其妙的哭| 头顶头发稀少是什么原因| 吃南瓜有什么好处和坏处| 托孤是什么意思| 尿血是什么病| 脑供血不足吃什么中成药| 山楂片泡水喝有什么好处| 出虚汗是什么原因| 发泥和发蜡有什么区别| 孤独的最高境界是什么| 什么是靶向疗法| 血小板高有什么危害| 六月份生日是什么星座| 马路上的菱形标志是什么意思| 肌无力是什么原因引起的| 胃疼看病挂什么科| dha不能和什么一起吃| 浪子回头金不换是什么意思| 带状疱疹吃什么药好| 姜薯是什么| 12345是什么投诉电话| 用黄瓜敷脸有什么功效| 女性耻骨疼是什么原因| 跳蚤怕什么| 孕妇熬夜对胎儿有什么影响| 膝盖积水是什么原因造成的| 肺气肿是什么原因导致的| 蛐蛐吃什么食物| 属虎男和什么属相最配| 牛鬼蛇神指什么生肖| 潴留是什么意思| 乳腺术后吃什么最好| 说梦话是什么原因| suv什么意思| 放屁特别臭是什么原因| 惊什么万什么| 气管炎的症状吃什么药好得快| 占卜是什么意思| 梦见做被子什么意思| 头发稀少是什么原因导致的| 肝内脂肪浸润是什么意思| 什么人不适合戴翡翠| 低头族是什么意思| 医是什么结构| 多潘立酮片治什么病| 梦见好多动物是什么意思| 避孕药有什么副作用| 大便变黑是什么原因| 头晕挂什么科比较好| 什么是气胸有什么症状| 痘痘里面挤出来的白色东西是什么| 吃什么祛湿| 成吉思汗什么意思| 1964年属什么生肖| 00后属什么生肖| 绮丽的什么| 丰富的近义词和反义词是什么| lv是什么意思| 单亲是什么意思| 儿郎是什么意思| bitch是什么意思| 吃什么拉什么完全不能消化怎么办| 想呕吐是什么原因| 狗是什么时辰| 气血不足有什么症状| 什么的香味| 炸薯条用什么油| 洗面奶什么牌子好| 鼻窦炎用什么药效果最好| 喉咙发炎吃什么食物好| 香油吃多了有什么害处| 一个令一个瓦念什么| 急性肾炎什么症状| 什么叫npc| porsche是什么牌子的车| 肚子经常疼是什么原因| 8月18日什么星座| 脖子上为什么会长丝状疣| 抖m什么意思| 梦见牛肉有什么征兆| 两眼中间的位置叫什么| 什么是脑卒中| kay是什么意思| 海参什么季节吃好| 炒木耳为什么会炸锅| 甲状腺过氧化物酶抗体高说明什么问题| 左后背发麻是什么原因| 陈凯歌为什么不娶倪萍| 打飞机是什么意思| 小拇指和无名指发麻是什么原因| 喉咙痛喝什么饮料| 金鱼可以和什么鱼混养| 是什么日子| 太阳穴疼是什么原因| 精神障碍是什么病| 做脑ct对人体有什么危害| 狗的本命佛是什么佛| 紫苏有什么功效与作用| 汗毛多是什么原因| 五子登科是什么意思| dc是什么| 长的像蛇的鱼是什么鱼| 114514是什么梗| 荨麻疹吃什么药好得快| 脂肪瘤去医院挂什么科| 过期蜂蜜还有什么用途| 中国国酒是什么酒| 药引子是什么意思| 6541是什么药| 2021年是什么命| 从来就没有什么救世主| 股骨头疼痛什么原因| 虹为什么是虫字旁| 为什么韩国叫棒子国| 大小便失禁是什么原因造成的| 赛博朋克什么意思| 蚯蚓中药叫什么| 尿酸高适合吃什么菜| 高胆红素血症是什么病| 城五行属什么| 保姆是什么意思| 槟榔是什么东西| 报喜鸟属于什么档次| 亦金读什么| 胰腺炎吃什么药好| cps是什么意思| 肤专家软膏主要治什么| 小肝功能是检查什么| 鳖孙是什么意思| 统战部是干什么的| 糖宝是什么虫| 医生助理是做什么的| 12点半是什么时辰| bell什么意思| 消化不良吃什么药最好| 星星为什么会眨眼| 流年花开讲的什么| 刘姥姥和贾府什么关系| 白交念什么| 薄荷叶晒干后能干什么| 孩子结膜炎用什么眼药水| 摩西摩西是什么意思| 空是什么结构| 喝酒对身体有什么好处和坏处| 睡眠质量不好挂什么科| 嗳气是什么症状| 风湿性关节炎用什么药效果好| 睾丸突然疼痛什么原因| 什么叫肾阳虚肾阴虚| ca125检查是什么意思| gree是什么牌子| 潜血试验阳性什么意思| 怀孕什么时候可以同房| 卡路里是什么| 猪肉排酸是什么意思| 儿化音是什么意思| 什么颜色招财并聚财| 偷鸡不成蚀把米什么意思| 维生素c十一什么意思| 文胸是什么意思| 什么人不能吃绿豆| 百度
*nix Documentation Project

  man pages->IRIX man pages -> standard/chmod (2)              
Title
Content
Arch
Section
 

Contents


chmod(2)							      chmod(2)


NAME    [Toc]    [Back]

     chmod, fchmod - change mode of file

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <sys/stat.h>

     int chmod(const char *path, mode_t	mode);

     int fchmod(int fildes, mode_t mode);

DESCRIPTION    [Toc]    [Back]

     chmod and fchmod set the access permission	portion	of the mode of the
     file whose	name is	given by path or referenced by the descriptor fildes
     to	the bit	pattern	contained in mode.  If path or fildes are symbolic
     links, the	access permissions of the target of the	symbolic links are
     set.  Access permission bits are interpreted as follows:

   S_ISUID   04000   Set user ID on execution.
   S_ISGID   020#0   Set group ID on execution if # is 7, 5, 3,	or 1
		     Enable mandatory file/record locking if # is 6, 4,	2, or 0
   S_ISVTX   01000   Save text image  after execution (a.k.a. Sticky bit).
   S_IRWXU   00700   Read, write, execute by owner.
   S_IRUSR   00400   Read by owner.
   S_IWUSR   00200   Write by owner.
   S_IXUSR   00100   Execute (search if	a directory) by	owner.
   S_IRWXG   00070   Read, write, execute by group.
   S_IRGRP   00040   Read by group.
   S_IWGRP   00020   Write by group.
   S_IXGRP   00010   Execute by	group.
   S_IRWXO   00007   Read, write, execute (search) by others.
   S_IROTH   00004   Read by others.
   S_IWOTH   00002   Write by others
   S_IXOTH   00001   Execute by	others.

     Modes are constructed by OR'ing the access	permission bits.

     The effective user	ID of the process must match the owner of the file or
     the process must be super-user to change the mode of a file.

     If	the effective user ID of the process is	not super-user,	the sticky bit
     is	cleared	for any	non-directory argument.

     If	the effective group ID of the process does not match the group ID of
     the file, and the process is not super-user the mode bit 02000 (set group
     ID	on execution) is cleared.

     If	a directory is writable	and the	sticky bit, S_ISVTX, is	set on the
     directory,	a process may remove or	rename files within that directory
     only if one or more of the	following is true [see unlink(2) and
     rename(2)]:




									Page 1






chmod(2)							      chmod(2)



	  the effective	user ID	of the process is the same as that of the
	  owner	ID of the file

	  the effective	user ID	of the process is the same as that of the
	  owner	ID of the directory

	  the process is a super-user.

     Note that the group id of the process and file are	not taken into account
     by	the rules above.  A process will only be able to remove	a file in a
     sticky directory based upon its effective user ID,	not its	group ID.

     In	releases of IRIX before	6.2, a process could also remove or rename
     files within a directory with the sticky bit set if the process had write
     permission	for the	file.  This has	been changed in	accordance with	the
     X/Open XPG4.2 standard, but the old behavior can be enabled via the
     xpg4_sticky_bit kernel tunable variable.

     If	the sticky bit,	S_ISVTX, is set	on a file that is a dynamic loader for
     an	ELF executable,	then when the executable is execed the old process's
     read only address spaces will be made available to	the dynamic loader in
     the new process.  This can	improve	program	start up time considerably.

     The setting of the	sticky bit on any other	file has no effect.

     If	the mode bit 02000 (set	group ID on execution) is set, the mode	bit
     00010 (execute or search by group)	is not set, and	the file is a regular
     file, file	and record locks will be mandatory.  Future calls to open(2),
     creat(2), read(2),	and write(2) will carry	implicit locks,	and may	fail
     or	block depending	on the presence	of other locks on the file.  Mapped
     file access is not	affected by mandatory locks.

     If	the mode bit 02000 is set on a directory, then any files created in
     that directory will take on the group ID of the directory rather than the
     group ID of the calling process.  mount(1M) may be	used to	enable this
     feature regardless	of the mode of the directory. [See fstab(4)].

     Mandatory locking is not supported	on NFS or CacheFS.

     Upon successful completion, chmod and fchmod mark for update the st_ctime
     field of the file.

     chmod will	fail and the file mode will be unchanged if one	or more	of the
     following are true:

     EACCES	    Search permission is denied	on a component of the path
		    prefix of path.

     EACCES	    Write permission on	the named file is denied.






									Page 2






chmod(2)							      chmod(2)



     EFAULT	    path points	outside	the allocated address space of the
		    process.

     EINTR	    A signal was caught	during execution of the	system call.

     EIO	    An I/O error occurred while	reading	from or	writing	to the
		    file system.

     ELOOP	    Too	many symbolic links were encountered in	translating
		    path.

     EMULTIHOP	    Components of path require hopping to multiple remote
		    machines and file system type does not allow it.

     ENAMETOOLONG   The	length of the path argument exceeds {PATH_MAX},	or the
		    length of a	path component exceeds {NAME_MAX} while
		    _POSIX_NO_TRUNC is in effect.

     ENOTDIR	    A component	of the prefix of path is not a directory.

     ENOENT	    Either a component of the path prefix, or the file
		    referred to	by path	does not exist or is a null pathname.

     ENOLINK	    path points	to a remote machine and	the link to that
		    machine is no longer active.

     ETIMEDOUT	    The	named file is located on a remote file system which is
		    not	available [see intro(2)].

     EPERM	    The	effective user ID does not match the owner of the file
		    and	the process is not super-user.

     EROFS	    The	file referred to by path resides on a read-only	file
		    system.

     fchmod will fail and the file mode	will be	unchanged if:

     EBADF	    fildes is not an open file descriptor

     EIO	    An I/O error occurred while	reading	from or	writing	to the
		    file system.

     EINTR	    A signal was caught	during execution of the	fchmod system
		    call.

     ENOLINK	    fildes refers to a remote machine and the link to that
		    machine is no longer active.

     ETIMEDOUT	    fildes refers to a file on a remote	file system which is
		    not	available [see intro(2)].





									Page 3






chmod(2)							      chmod(2)



     EPERM	    The	effective user ID does not match the owner of the file
		    and	the process is not super-user.

     EROFS	    The	file referred to by fildes resides on a	read-only file
		    system.

     EINVAL	    The	file referred to by fildes resides on NFS or CacheFS
		    and	mandatory locking is being enabled.

SEE ALSO    [Toc]    [Back]

      
      
     chmod(1), access(2), chown(2), creat(2), exec(2), fcntl(2), mknod(2),
     open(2), read(2), stat(2),	write(2), mkfifo(3C), stat(5)

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of	-1 is returned and errno is set	to indicate the	error.

BUGS    [Toc]    [Back]

     Due to the	overloading of various permission bits,	the silent turning off
     of	the set	group ID on execution bit under	the above mentioned
     circumstances may in fact have disabled mandatory file/record locking
     (for files) or group inheritance (for directories).  The only way to
     determine if chmod	really worked in these cases is	to stat(2) the file.


									PPPPaaaaggggeeee 4444
[ Back ]
 Similar pages
Name OS Title
chmod IRIX change mode of a file
chmod HP-UX change file mode access permissions
chmod HP-UX change file mode access permissions
fchmod HP-UX change file mode access permissions
chmod IRIX change the permissions mode of a file or directory
doublebuffer IRIX sets the display mode to double buffer mode
umask IRIX set file-creation mode mask
umask OpenBSD set file creation mode mask
umask FreeBSD set file creation mode mask
umask NetBSD set file creation mode mask
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service
唇炎用什么药 尿蛋白高不能吃什么食物 胳膊上种花是什么疫苗 早搏是什么原因引起的 胰是什么器官
肛周湿疹挂什么科 生理期腰疼是什么原因 肾结石少吃什么食物 中暑喝什么好 医保和农村合作医疗有什么区别
雪五行属什么 怀孕吃什么好 热血病是什么病 片的第二笔是什么 每天头疼是什么原因引起的
1月10号是什么星座 眼睛流眼泪用什么眼药水 脑淤血是什么原因引起的 r是什么数 半月板变性是什么意思
黄芪不能和什么一起吃96micro.com 海带绿豆汤有什么功效hanqikai.com 吃什么软化血管hcv8jop3ns0r.cn 什么是科学hcv9jop2ns2r.cn 瑾字是什么意思hcv7jop7ns4r.cn
hoegaarden是什么啤酒hcv7jop5ns2r.cn hpv是什么症状hcv8jop4ns4r.cn 肿瘤cr是什么意思cj623037.com 三百年前是什么朝代hcv8jop6ns1r.cn 梦见扫墓是什么预兆hcv8jop5ns1r.cn
移徒什么意思xscnpatent.com 脚跟疼是什么原因huizhijixie.com hd什么意思hcv8jop2ns5r.cn 外援是什么意思hcv8jop8ns6r.cn 山楂泡水喝有什么好处hcv9jop8ns1r.cn
背靠背是什么牌子naasee.com 反流性食管炎挂什么科hcv7jop9ns2r.cn 伤口溃烂不愈合用什么药hcv9jop5ns3r.cn 一人吃饱全家不饿是什么生肖hcv8jop2ns9r.cn 飞鱼籽是什么鱼的籽hcv8jop5ns9r.cn
百度