免费注册 查看新帖 |

Chinaunix

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

[系统管理] 求助:CentOS6.9纯root用户无法写入/etc/init.d [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2018-04-15 21:30 |只看该作者 |倒序浏览
求助,本人系统CentOS6.9,只有一个root用户,但是不能在/etc/init.d/目录下写入文件,提示没有权限。

[root@web ~]# ll /etc/init.d
lrwxrwxrwx 1 root root 11 Apr 14 22:18 /etc/init.d -> rc.d/init.d

[root@web ~]# touch /etc/init.d/file
touch: cannot touch `/etc/init.d/file': Permission denied

[root@web ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       901G  632G  223G  74% /
tmpfs           3.9G   40K  3.9G   1% /dev/shm
/dev/sda1       190M   55M  125M  31% /boot
/dev/sdb1       1.8T 1016G  725G  59% /storage

[root@web ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda2                               partition       16777212        0       -1

[root@web ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          7986        742       7243          0         46        417
-/+ buffers/cache:        277       7708
Swap:        16383          0      16383


尝试用VI操作,保存时提示:

Entering Ex mode.  Type "visual" to go to Normal mode.
:wq
"/etc/rc.d/init.d/file"
"/etc/rc.d/init.d/file" E212: Can't open file for writing



真是让人郁闷啊,,请各位大侠帮忙,万分感谢。


论坛徽章:
0
2 [报告]
发表于 2018-04-20 21:53 |只看该作者
id root
看看是不是真root
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP