免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: dahe_1984
打印 上一主题 下一主题

求助: unlink 怎么还有权限问题 [复制链接]

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
21 [报告]
发表于 2012-03-27 17:09 |只看该作者
dahe_1984 发表于 2012-03-27 16:40
我说的是perl中如何实现,不是shell/


你可以用 ioctl,不过我觉得这个还是直接调用 chattr/lsattr 来的简单些。

论坛徽章:
0
22 [报告]
发表于 2012-03-27 17:45 |只看该作者
回复 10# dahe_1984


    目录权限决定它下面的文件的权限?

论坛徽章:
0
23 [报告]
发表于 2012-03-27 18:31 |只看该作者
本帖最后由 Perl_Er 于 2012-03-27 18:32 编辑

Figure 4.26. Summary of file access permission bits[td]

Constant


Description


Effect on regular file


Effect on directory


S_ISUID


set-user-ID


set effective user ID on execution


(not used)


S_ISGID


set-group-ID


if group-execute set then set effective group ID on execution; otherwise enable mandatory record locking (if supported)


set group ID of new files created in directory to group ID of directory


S_ISVTX


sticky bit


control caching of file contents (if supported)


restrict removal and renaming of files in directory


S_IRUSR


user-read


user permission to read file


user permission to read directory entries


S_IWUSR


user-write


user permission to write file


user permission to remove and create files in directory


S_IXUSR


user-execute


user permission to execute file


user permission to search for given pathname in directory


S_IRGRP


group-read


group permission to read file


group permission to read directory entries


S_IWGRP


group-write


group permission to write file


group permission to remove and create files in directory


S_IXGRP


group-execute


group permission to execute file


group permission to search for given pathname in directory


S_IROTH


other-read


other permission to read file


other permission to read directory entries


S_IWOTH


other-write


other permission to write file


other permission to remove and create files in directory


S_IXOTH


other-execute


other permission to execute file


other permission to search for given pathname in directory


论坛徽章:
0
24 [报告]
发表于 2012-03-28 09:50 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
25 [报告]
发表于 2012-03-29 17:41 |只看该作者
Perl_Er 发表于 2012-03-27 18:31
Figure 4.26. Summary of file access permission bits[/tr]


只能说你太牛了,不过我没搞这么复杂,直接把目录的权限改成了777,大家谁都可以读写就OK。

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
26 [报告]
发表于 2012-03-29 19:15 |只看该作者
dahe_1984 发表于 2012-03-29 17:41
只能说你太牛了,不过我没搞这么复杂,直接把目录的权限改成了777,大家谁都可以读写就OK。


誰也都可以刪除,想來對你來說也是 OK 的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP