rm: 无法删除"/run/user/root/gvfs": 是一个目录 问题
2014-01-01 10:55
771 查看
2013-03-02
bxd@linux:~$ sudo su
[sudo] password for bxd:
root@linux:/home/bxd# exit
exit
rm: 无法删除"/run/user/root/gvfs": 是一个目录
bxd@linux:~$
------------------------------
这似乎是一个bug, 我也不清楚怎么回事。 解决办法好像是在退出之前运行 umount /run/user/root/gvfs ,然后就可以删除这个目录了。
参见 : http://askubuntu.com/questions/233668/r ... -directory https://bugs.launchpad.net/ubuntu/+sour ... ug/1077569
******************************
root下无法读写文件探究
2012-08-24
1 在root权限下无法复制~/.gvfs/,也无法删除~/.gvfs/
备份/home时出错
/usr/share/backup# ./backup
cp: 无法获取"/home/hic/.gvfs" 的文件状态(stat): 权限不够
tar: 2012-08-24_17_06_53:无法 stat: 没有那个文件或目录
tar: 由于前次错误,将以上次的错误状态退出
.....................................
6 尝试卸载~/.gvfs/,竟然成功
按照网上的说明,使用mount卸载
~# umount .gvfs/
没有报错,说明卸载成功
7 ~/.gvfs是gvfs-fuse的挂载点
下面是一段关于gvfs的介绍:
What is the "fuse-daemon"?
gvfs-fuse-daemon mounts your network connections as local file
systems. The .gvfs dir is where any mounted network/other file systems
are stored.
For example: if you connect to you cellphone via the other:\\ prtocol,
that directory wiil be mounted under the .gvfs dir so that legacy
applications can access it.(like the terminal)
8 卸载之后
~# ll | grep .gvfs/
drwx------ 2 hic hic 4096 8月 21 19:15 .gvfs/
此时,已经可以使用root进入,也可以复制甚至删除。
9 重启之后此文件仍旧会出现
但是它的权限仍旧和之前未卸载一样,root权限下不能复制和删除。
10 在root权限下仍旧不能查看
~$ sudo -s
~# ll -d .gvfs/
ls: 无法访问.gvfs/: 权限不够
11 在一般用户权限下,却能查看,复制甚至删除
~$ ll -d .gvfs/
dr-x------ 2 hic hic 0 8月 24 18:43 .gvfs//
12 找到网上的一篇说明
There is FUSE virtual filesystem mounted at ~/.gvfs. For the majority
of filesystem acceses, permissions are ignored for the root
user. However, FUSE virtual filesystems mounts are one of the rare
exceptions. FUSE virtual filesystems normally restricted to user who
mounted them. In this case , the gvfs-fuse-daemon command(run as part
of your desktop session)created this mount, belonging to you, and
no-one else can access it, including root.
它的意思就是,该文件可以在普通用户权限下进行更改,但是除了该用户之外,
其它用户不可能对其进行读取或者删除,包括root也一样。
13 小结
在备份/home的时候,不能用root,否则无法复制.gvfs/出现错误。正确的做法是,以普通权限备份,这样就能避免该错误的发生。
bxd@linux:~$ sudo su
[sudo] password for bxd:
root@linux:/home/bxd# exit
exit
rm: 无法删除"/run/user/root/gvfs": 是一个目录
bxd@linux:~$
------------------------------
这似乎是一个bug, 我也不清楚怎么回事。 解决办法好像是在退出之前运行 umount /run/user/root/gvfs ,然后就可以删除这个目录了。
参见 : http://askubuntu.com/questions/233668/r ... -directory https://bugs.launchpad.net/ubuntu/+sour ... ug/1077569
******************************
root下无法读写文件探究
2012-08-24
1 在root权限下无法复制~/.gvfs/,也无法删除~/.gvfs/
备份/home时出错
/usr/share/backup# ./backup
cp: 无法获取"/home/hic/.gvfs" 的文件状态(stat): 权限不够
tar: 2012-08-24_17_06_53:无法 stat: 没有那个文件或目录
tar: 由于前次错误,将以上次的错误状态退出
.....................................
6 尝试卸载~/.gvfs/,竟然成功
按照网上的说明,使用mount卸载
~# umount .gvfs/
没有报错,说明卸载成功
7 ~/.gvfs是gvfs-fuse的挂载点
下面是一段关于gvfs的介绍:
What is the "fuse-daemon"?
gvfs-fuse-daemon mounts your network connections as local file
systems. The .gvfs dir is where any mounted network/other file systems
are stored.
For example: if you connect to you cellphone via the other:\\ prtocol,
that directory wiil be mounted under the .gvfs dir so that legacy
applications can access it.(like the terminal)
8 卸载之后
~# ll | grep .gvfs/
drwx------ 2 hic hic 4096 8月 21 19:15 .gvfs/
此时,已经可以使用root进入,也可以复制甚至删除。
9 重启之后此文件仍旧会出现
但是它的权限仍旧和之前未卸载一样,root权限下不能复制和删除。
10 在root权限下仍旧不能查看
~$ sudo -s
~# ll -d .gvfs/
ls: 无法访问.gvfs/: 权限不够
11 在一般用户权限下,却能查看,复制甚至删除
~$ ll -d .gvfs/
dr-x------ 2 hic hic 0 8月 24 18:43 .gvfs//
12 找到网上的一篇说明
There is FUSE virtual filesystem mounted at ~/.gvfs. For the majority
of filesystem acceses, permissions are ignored for the root
user. However, FUSE virtual filesystems mounts are one of the rare
exceptions. FUSE virtual filesystems normally restricted to user who
mounted them. In this case , the gvfs-fuse-daemon command(run as part
of your desktop session)created this mount, belonging to you, and
no-one else can access it, including root.
它的意思就是,该文件可以在普通用户权限下进行更改,但是除了该用户之外,
其它用户不可能对其进行读取或者删除,包括root也一样。
13 小结
在备份/home的时候,不能用root,否则无法复制.gvfs/出现错误。正确的做法是,以普通权限备份,这样就能避免该错误的发生。
相关文章推荐
- reinstall_xbt: Linux中如何查看文件的最初创建时间
- GotGitHub
- 2013总结-2014计划
- CentOS 6上安装xfce桌面环境
- Vbox如何修改虚拟机器的uuid
- 【题解】英雄会第二届在线编程大赛·CSDN现场决赛:三元组的数量
- bzoj 3232 01分数规划+最大权封闭子图判定
- linux_脚本应用
- 网络安装archlinux(2012.8.20)笔记
- java提高篇(二十)-----集合大家族
- java提高篇(二十)-----集合大家族
- 游戏中的脚本语言
- 在ubuntu下配置apache运行python脚本
- Android ListView中按钮监听器设置的解决方案
- AUPE学习第七章------进程环境
- 全国DNS服务器IP地址【电信、网通、铁通】
- Java跳出循环的方法
- SCRIPT: FULLY DECODED LOCKING (文档 ID 1020008.6)
- linux下各种文件格式的压缩以及解压缩命令(长期更新)
- fdisk命令使用说明