孕妇吃香蕉对胎儿有什么好处| 梦见捡到很多钱是什么意思| 呼和浩特有什么特产| 耳朵流血是什么原因| 孕妇做唐筛是检查什么| 什么东西醒酒| 检查胃挂什么科| 海参吃了有什么好处| 荔枝为什么上火| 性冷淡是什么| 未退化胸腺是什么意思| 东南角风水代表什么| 指甲有条纹是什么原因| 湿气太重吃什么| 婚检是什么意思| 心里恶心是什么原因| 脾胃虚寒吃什么中成药| 减肥该吃什么| 做梦梦到踩到屎是什么意思| pr是什么意思医学| 奥斯卡小金人什么意思| 普通的近义词是什么| 47岁属什么| 弱的部首是什么| 梦见自己流产了是什么征兆| 透析病人磷高了吃什么降磷| 下夜班是什么意思| 身体突然消瘦是什么原因| 穿丝袜有什么好处| 籍贯是指什么| 李连杰是什么国籍| 碳酸盐是什么| la是什么牌子| 孕妇喝可乐对胎儿有什么影响| 月经期间可以喝什么茶| 吃什么补维生素d| 揭榜是什么意思| 血糖高可以喝什么粥| 什么是烟雾病| 王者风范是什么意思| 大便黑色是什么原因| 五行缺什么怎么查询| 什么是七七事变| 眼底出血用什么药最好| 喝酒后呕吐是什么原因| 子宫内膜增厚有什么影响| 区间是什么意思| 未属什么五行| 老鹰的绝症是什么| 鼻子里面痒是什么原因| 咳嗽嗓子有痰吃什么药| 七夕送什么礼物好| phe是什么氨基酸| 阴道杆菌是什么意思| 为什么16岁不能吃维生素B| 阳痿是什么原因引起的| 天行健的下一句是什么| 吃什么能降尿蛋白| 肚子胀气吃什么通气| 淋巴细胞计数偏低是什么原因| 常务副县长是什么级别| 歇菜是什么意思| 1957年属什么生肖| 梦见摘枣是什么意思| cordura是什么面料| 睾丸炎吃什么药| 骨转移用什么药能治愈| 肺炎咳嗽吃什么药| 胸腺肿瘤是什么病| 玄凤鹦鹉吃什么| 违拗是什么意思| 梦见自己手机丢了是什么意思| 左舌根疼痛是什么情况| 蔻驰手表属于什么档次| 落荒而逃什么意思| 鹿象征什么寓意| 系统性红斑狼疮不能吃什么| 说话不清楚去医院挂什么科| 暴殄天物是什么生肖| 淋巴细胞百分比高是什么原因| 虾为什么叫对虾| 水囊是什么| 尿肌酐是什么| 艾滋病检查什么项目| 女娲用什么补天| 朋友的意义是什么| 肛门瘙痒挂什么科| 肝胃不和吃什么中成药| 鹅口疮是什么样的图片| 孕妇喉咙痛吃什么好得最快| 吃什么促进恶露排干净| 大大是什么意思| 二椅子什么意思| 牙周炎用什么药最见效| notice是什么意思| 盼头是什么意思| 体温偏高的人说明什么| 植脂末是什么东西| 钾低会出现什么症状| 软冷冻室一般放什么东西| 天朝是什么意思| 撕票是什么意思| 什么血型会导致不孕| 璟字五行属什么| 舒张压偏高是什么原因| 繁衍的衍是什么意思| 总胆红素高说明什么| 孕妇手麻是什么原因引起的| 吃什么药能快速降血压| 吃洋葱对身体有什么好处| 条索影是什么意思| 飞机为什么不能说一路顺风| 冠心病什么症状| 一片冰心在玉壶的冰心是什么意思| 我低头向山沟是什么歌| 什么是双规| 尿酸高的人不能吃什么| 晚上总是做梦是什么原因引起的| 爱有什么用| 明了是什么意思| 单核细胞高是什么原因| 蜈蚣怕什么| 什么的原野| 什么是清关| 特长是什么| 高密度脂蛋白胆固醇偏低是什么原因| 什么秒必争| 什么程度下病危通知书| 为什么男怕招风耳| 双侧中耳乳突炎是什么意思| 埃及的母亲河是什么| 切克闹是什么意思| 微不足道什么意思| 吃什么能提高性功能| 什么水果含维生素c最多| 河南是什么气候| 喉咙有痰咳嗽是什么原因| 头疼吃什么药效果好| 戏谑是什么意思| 消瘦挂什么科| 盐是什么| 彩色的什么| 哈乐是什么药| 压力与什么有关| 望梅止渴是什么意思| 佛心果是什么东西| 老年人打嗝不止是什么原因| 4月5号是什么星座| 双肺条索是什么意思| 千山鸟飞绝的绝是什么意思| 新晋是什么意思| 鸭肉不能和什么一起吃| 壬字五行属什么| 手肘关节疼痛什么原因| 脾阳虚吃什么药| 什么最解渴| 铅中毒是什么引起的| 吃什么菜减肥最快| 狸猫是什么动物| 孕期不能吃什么| 血糖高可以吃什么| 2039年是什么年| 一九四六年属什么生肖| 什么的石桥| IB是什么| mdt是什么意思| 女孩子喜欢什么礼物| 看见蛇有什么预兆| 什么是姑息治疗| 鼻炎咳嗽吃什么药| 百岁老人叫什么| 肝肾阴虚吃什么药| 0.618是什么意思| 指甲白色是什么原因| 装藏是什么意思| 葡萄是什么意思| 一什么房子| 朗姆酒是什么酒| 外伤挂什么科| 红脸关公代表什么意思| 清洁度111是什么意思| 鹰头皮带是什么牌子| 不以为意什么意思| 破瓜年华是什么意思| 空调制冷量是什么意思| 绒穿和羊穿有什么区别| 望而生畏是什么意思| 阴蒂长什么样| 无所不用其极什么意思| 孕妇吃鸡蛋对胎儿有什么好处| 磕碜是什么意思| 圈层是什么意思| 最贵的金属是什么| 58岁属什么生肖| 磕头虫吃什么| 心脏不好吃什么| 胎盘内血池是什么| 喉咙发炎吃什么消炎药| 口臭要做什么检查| 增强免疫力打什么针| 顾名思义的顾是什么意思| 径行是什么意思| 拉肚子为什么会发烧| hpv是什么意思| 什么是早搏| 舌头干燥吃什么药| 逍遥丸什么人不能吃| 脑梗病人吃什么营养恢复最好| 什么是三级片| 过期蜂蜜还有什么用途| 熙熙攘攘是什么意思| 72年属什么生肖属相| 私处痒用什么药| 三七粉什么时间喝好| 婴儿喝什么奶粉最好| 最难做的饭是什么| 三三两两是什么生肖| 吃什么食物补钾| 转氨酶高吃什么食物好| 一周年祭日有什么讲究| 唐僧真名叫什么| 脑供血不足什么症状| 眼干眼涩眼疲劳用什么眼药水| 533是什么意思| 粘液阳性是什么意思| 男性肾虚有什么症状| iqr是什么意思| 焦虑症是什么病| 人肉什么意思| 血管瘤有什么危害吗| 食之无味什么意思| 双子座和什么座最不配| 打火机里面的液体是什么| 吃什么补充蛋白质| 全国劳动模范有什么待遇| hdr是什么拍照功能| 胳膊疼挂什么科| 三点水加个真念什么| 预调酒是什么意思| 送男生什么礼物| 笏是什么意思| 温州有什么好玩的| 关塔那摩监狱为什么在古巴| 左肺下叶钙化灶是什么意思| 皮脂腺囊肿是什么原因引起的| 脑震荡什么症状| 月经推迟是什么原因| 人肉是什么味道| 梦见衣服是什么意思| 空调输入功率是什么意思| 梦到自己掉牙齿是什么预兆| 拉抽屉是什么现象| 菜园里有什么菜| 平均血小板体积低是什么原因| 氮肥是什么肥料| 口腔出血是什么病征兆| 什么王| 天干地支是什么意思| 疽是什么意思| 怀孕上火吃什么能降火| 吧可以组什么词| 靖康耻指的是什么历史事件| 大专有什么专业| gary是什么意思| 百度
*nix Documentation Project

  man pages->FreeBSD man pages -> chmod (2)              
Title
Content
Arch
Section
 

CHMOD(2)

Contents


NAME    [Toc]    [Back]

     chmod, fchmod, lchmod -- change mode of file

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/stat.h>

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

     int
     fchmod(int fd, mode_t mode);

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

DESCRIPTION    [Toc]    [Back]

     The file permission bits of the file named specified by path or referenced
 by the file descriptor fd are changed to mode.  The chmod() system
     call verifies that the process owner (user) either owns the file specified
 by path (or fd), or is the super-user.  The chmod() system call follows
 symbolic links to operate on the target of the link rather than the
     link itself.

     The lchmod() system call is similar to chmod() but does not follow symbolic
 links.

     A mode is created from or'd permission bit masks defined in <sys/stat.h>:

	   #define S_IRWXU 0000700    /* RWX mask for owner */
	   #define S_IRUSR 0000400    /* R for owner */
	   #define S_IWUSR 0000200    /* W for owner */
	   #define S_IXUSR 0000100    /* X for owner */

	   #define S_IRWXG 0000070    /* RWX mask for group */
	   #define S_IRGRP 0000040    /* R for group */
	   #define S_IWGRP 0000020    /* W for group */
	   #define S_IXGRP 0000010    /* X for group */

	   #define S_IRWXO 0000007    /* RWX mask for other */
	   #define S_IROTH 0000004    /* R for other */
	   #define S_IWOTH 0000002    /* W for other */
	   #define S_IXOTH 0000001    /* X for other */

	   #define S_ISUID 0004000    /* set user id on execution */
	   #define S_ISGID 0002000    /* set group id on execution */
	   #define S_ISVTX 0001000    /* sticky bit */
	   #ifndef _POSIX_SOURCE
	   #define S_ISTXT 0001000
	   #endif

     The FreeBSD VM system totally ignores the sticky bit (ISVTX) for executables.
  On UFS-based file systems (FFS, LFS) the sticky bit may only be
     set upon directories.

     If mode ISVTX (the `sticky bit') is set on a directory, an unprivileged
     user may not delete or rename files of other users in that directory.
     The sticky bit may be set by any user on a directory which the user owns
     or has appropriate permissions.  For more details of the properties of
     the sticky bit, see sticky(8).

     If mode ISUID (set UID) is set on a directory, and the MNT_SUIDDIR option
     was used in the mount of the file system, then the owner of any new files
     and sub-directories created within this directory are set to be the same
     as the owner of that directory.  If this function is enabled, new directories
 will inherit the bit from their parents.  Execute bits are removed
     from the file, and it will not be given to root.  This behavior does not
     change the requirements for the user to be allowed to write the file, but
     only the eventual owner after it has been created.  Group inheritance is
     not affected.

     This feature is designed for use on fileservers serving PC users via ftp,
     SAMBA, or netatalk.  It provides security holes for shell users and as
     such should not be used on shell machines, especially on home directories.
  This option requires the SUIDDIR option in the kernel to work.
     Only UFS file systems support this option.  For more details of the suiddir
 mount option, see mount(8).

     Writing or changing the owner of a file turns off the set-user-id and
     set-group-id bits unless the user is the super-user.  This makes the system
 somewhat more secure by protecting set-user-id (set-group-id) files
     from remaining set-user-id (set-group-id) if they are modified, at the
     expense of a degree of compatibility.

RETURN VALUES    [Toc]    [Back]

     Upon successful completion, the value 0 is returned; otherwise the
     value -1 is returned and the global variable errno is set to indicate the
     error.

ERRORS    [Toc]    [Back]

     The chmod() system call will fail and the file mode will be unchanged if:

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

     [ENAMETOOLONG]	A component of a pathname exceeded 255 characters, or
			an entire path name exceeded 1023 characters.

     [ENOENT]		The named file does not exist.

     [EACCES]		Search permission is denied for a component of the
			path prefix.

     [ELOOP]		Too many symbolic links were encountered in translating
 the pathname.

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

     [EROFS]		The named file resides on a read-only file system.

     [EFAULT]		The path argument points outside the process's allocated
 address space.

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

     [EFTYPE]		An attempt was made to set the sticky bit upon an executable.


     The fchmod() system call will fail if:

     [EBADF]		The descriptor is not valid.

     [EINVAL]		The fd argument refers to a socket, not to a file.

     [EROFS]		The file resides on a read-only file system.

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

SEE ALSO    [Toc]    [Back]

      
      
     chmod(1), chown(2), open(2), stat(2), sticky(8)

STANDARDS    [Toc]    [Back]

     The chmod() system call is expected to conform to ISO/IEC 9945-1:1990
     (``POSIX.1''), except for the return of EFTYPE and the use of S_ISTXT.

HISTORY    [Toc]    [Back]

     The chmod() function appeared in Version 7 AT&T UNIX.  The fchmod() system
 call appeared in 4.2BSD.  The lchmod() system call appeared in
     FreeBSD 3.0.


FreeBSD 5.2.1			 June 4, 1993			 FreeBSD 5.2.1
[ Back ]
ab血型和o血型的孩子是什么血型 什么时间种白菜 抽烟打嗝是什么情况 obl是什么意思 雌性激素是什么
苯中毒是什么症状 大蒜有什么功效 空灵是什么意思 如来藏是什么意思 教育的目的是什么
曹操叫什么 眩光是什么意思 肠胃紊乱吃什么药 女人为什么要穿高跟鞋 10月出生的是什么星座
什么补血最快 农历六月十九是什么日子 四季常青财运旺是什么生肖 五月二十日是什么日子 补气血喝什么泡水
脚踝肿挂什么科hcv9jop1ns1r.cn 太后是皇上的什么人hcv7jop9ns5r.cn 喝什么牌子的水最健康hcv9jop0ns1r.cn 结膜炎是什么症状creativexi.com 柳下惠姓什么hcv8jop4ns5r.cn
stomach什么意思hcv8jop6ns7r.cn 心率过快会有什么后果cl108k.com 狮子属于什么科hcv8jop7ns4r.cn 地西泮又叫什么hcv7jop5ns4r.cn 塔克是什么食物hcv8jop4ns3r.cn
转氨酶高挂什么科hcv7jop5ns6r.cn 前列腺b超能检查出什么hcv8jop8ns3r.cn 17年属什么生肖hcv8jop4ns4r.cn 什么叫根管治疗hcv7jop6ns9r.cn 献血有什么危害hcv9jop0ns0r.cn
什么是肌酐hcv8jop8ns6r.cn 办护照需要什么材料weuuu.com 519是什么星座hcv9jop2ns7r.cn 喝了蜂蜜水不能吃什么hcv8jop3ns5r.cn 蝉联的意思是什么hcv9jop2ns7r.cn
 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
百度