免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 904 | 回复: 0
打印 上一主题 下一主题

Permission denied [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-25 20:40 |只看该作者 |倒序浏览
机器装上Red Hat Linux 9.0到今日已经有一周时间了,在这段时间内,只是看着书跟着上面的shell命令照本宣科,依样画葫芦。以前没有接触过Linux操作系统,所以脑子里对其是空的,可能正是这样,自我感觉在这一周内学得还算多的。但是,昨天在学习shell命令chmod(改变文件或目录的权限)时,对我的主目录/home/clifford进行了$chmod -R 644 ./newdocu,-R该选项是用于一次改变一个目录结构中所有文件和目录的许可权限。后来,又进行了$chmod -R 644 /home/clifford,644对应的是文件拥有者clifford有对该文件及其目录下读和写的权限,而和cliffod同一组的用户以及其他用户者只能对文件拥有读取的权限,当时又继续练习了些其它的命令。
       翌日,当我再次以clifford登陆时,却不能进入UI界面,提示一对话框,内容如下:
                          Please contact your system administrator to resolve the following problem:
    Could not open or create the file "home/clifford/.gconf-test-locking-file";this indicates that
    there may be a problem with your configuration,as many programs will need to creat files in your
    home directory.The erro was"Permission denied"(errno=13).
关闭该对话框后出现的就是没有什么图标的蓝屏。重启再登陆后仍是这个现象。以root用户能正常进入系统。
        发生这个现象后,我再查阅昨日所看书籍,没有很好的解释,自己依据对话框的内容分析应是权限问题引起的,用户clifford没有执行的权限了,再Google下,发现这类问题不多见,但有一个名steve发的贴子和我的却是相合,原贴如下:
        I've been using Linux at home pretty steadily for three years. For the past
three months it's been Red Hat 9 which I like the best so far. But suddenly
I've got a problem. I can log on as root. But when I try to log on as a
user, I get this: "could not open or create file
/home/steve/.gconf-test-locking-file"
Apparently it has to do with permissions. The user "steve" is UID 500. But
the folder /home/steve is owned by 501 ! Huh. I logged on as root and
changed the folder to UID 500. But it still didn't work. A search in
Google seemed to show that others had run into this, but I couldn't find the
solution.
Any help would be appreciated.
stevebee
其贴后有叫paul Lutus回道:
Use your head(原文对一叫Jeffrey的说的,此人建议以根用户进入系统,要么修改文件.gconf-test-locking-file的拥有权要么删除该文件as root, either chown /home/steve/.gconf-test-locking-file or rm it.
). Why can't a process owned by steve create a file in the steve
directory? Look at the directory's permissions and ownership.
And avoid the use of numbers for group and owner designations as much as
possible. Use the names of users and groups as much as you can. It prevents
the kind of confusion you are experiencing right now.
It's obvious that you changed the ownership or permissions on the directory
in question. Just change it back.
接着就是steve回复说是问题解决,原因释道:it was a simple ownership/permission issue.
读至此,若steve之事属实,那即证实我所遇到的也是是权限问题。要想把自己的系统回复到原样,就要修改clifford及其目录下的权限,但是关键是要怎么改回去呢,本来的权限是什么呢,我试了几种组合,却仍不见效。
        无法,再以root身份进入,新增一用户,欲以新用户的/home/newuser文件夹为样,依依作记录,再修改clifford中的。但是,当我以新用户登陆却又发现一问题,/home/newuser下没有任何文件或文件夹,这又使我困惑了。百般无奈下,只好暂时先放放,明日去图书馆查找资料,待以后学习中慢慢领会,毕竟我觉得对我这个刚起步的人在这个问题上硬钻,不如先行缓缓留待日后有能力再行解决,唯怕自己日后忘却,今晚特在此作下blog。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16363/showart_90886.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP