免费注册 查看新帖 |

Chinaunix

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

系统所有文件全部变成只读?(已解决) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-31 13:20 |只看该作者 |倒序浏览
昨天还是好好的,今天我在压缩一下文件的时候,发现压不了,vi也编译不了文件。
所有的文件都变成只读了,是什么原因啊?
和硬件有关系吗?
请大牛指点啊

我用的是root用户

[ 本帖最后由 yinchonging 于 2007-8-1 16:40 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-07-31 13:27 |只看该作者
执行一下mount命令,看看文件系统是不是以只读方式挂载的

论坛徽章:
0
3 [报告]
发表于 2007-07-31 13:31 |只看该作者
[root@cxl1 /]# mount
/dev/sda5 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda2 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)

都是可读写的啊

[ 本帖最后由 yinchonging 于 2007-7-31 13:35 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-07-31 13:41 |只看该作者
你登录的用户是root?文件的权限什么样子的?

论坛徽章:
0
5 [报告]
发表于 2007-07-31 13:44 |只看该作者
我登陆的用户就是root

[root@cxl1 /]# ls -l
总用量 134314
drwxr-xr-x    2 root root     4096 2007-01-10  bin
drwxr-xr-x    4 root root     1024  7月 22 07:14 boot
drwxr-xr-x    8 root root     4096  2月  1 13:00 data
-rw-r--r--    1 root root 12478314  2月  1 13:00 data.tar
-rw-r--r--    1 root root 92242170  1月 31 10:02 data.zip
drwxr-xr-x    7 root root     5360  7月 22 00:52 dev
drwxr-xr-x   80 root root     8192  7月 28 04:04 etc
drwxr-xr-x    4 root root     4096  3月 13 17:30 home
drwxr-xr-x   12 root root     4096  5月  8 14:27 huangye
drwxr-xr-x   29 root root     4096  7月 30 01:47 index
drwxr-xr-x    3 root root     4096  5月 17 15:20 index1
-rw-r--r--    1 root root 31975027  5月 17 15:27 index.tar
drwxr-xr-x    2 root root     4096 2004-08-13  initrd
drwxr-xr-x   11 root root     4096 2007-01-10  lib
drwx------    2 root root     4096 2007-01-10  lost+found
drwxr-xr-x    4 root root     4096  7月 22 00:52 media
drwxr-xr-x    2 root root     4096 2005-12-02  misc
drwxr-xr-x    3 root root     4096  7月 22 00:37 mnt
drwxr-xr-x    5 root root     4096  3月 14 10:06 opt
dr-xr-xr-x  287 root root        0  7月 22 08:51 proc
drwxr-x---   23 root root     4096  7月 22 00:53 root
drwxr-xr-x    2 root root     8192 2007-01-10  sbin
drwxr-xr-x    2 root root     4096 2007-01-10  selinux
drwxr-xr-x    2 root root     4096 2004-08-13  srv
drwxr-xr-x    9 root root        0  7月 22 08:51 sys
drwxrwxrwt   12 root root     4096  7月 30 04:02 tmp
drwxr-xr-x   15 root root     4096  4月 11 17:34 usr
drwxr-xr-x   19 root root     4096 2007-01-10  var

论坛徽章:
0
6 [报告]
发表于 2007-07-31 13:46 |只看该作者
没有遇到这个情况。试试用单用户模式登录,然后fsck检查一下文件系统

论坛徽章:
0
7 [报告]
发表于 2007-07-31 14:14 |只看该作者
我重新挂载也不行
[root@pt /]# mount -o rw,remount /
mount: block device /dev/sda3 is write-protected, mounting read-only


[root@pt /]# fsck
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/: clean, 307918/19398656 files, 11963240/38790950 blocks
e2fsck 1.35 (28-Feb-2004)
/dev/sda1 is mounted.  

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/boot: recovering journal
/boot: clean, 38/26104 files, 14653/104388 blocks

[ 本帖最后由 yinchonging 于 2007-7-31 14:18 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2007-07-31 14:18 |只看该作者
这个确实不知道了……

论坛徽章:
0
9 [报告]
发表于 2007-07-31 14:49 |只看该作者
mount 命令的结果不可靠 !!


要查看 /proc/mounts 文件,前者是非实时的

论坛徽章:
0
10 [报告]
发表于 2007-07-31 14:51 |只看该作者
[root@pt proc]# cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw,nodiratime 0 0
none /dev tmpfs rw 0 0
/dev/root / ext3 ro 0 0
none /dev tmpfs rw 0 0
none /selinux selinuxfs rw 0 0
/proc /proc proc rw,nodiratime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
/sys /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
/dev/sda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

文件第四行dev/root / ext3 ro 0 0
怎么个解决发?高手大牛们?

[ 本帖最后由 yinchonging 于 2007-7-31 14:52 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP