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/出现错误。正确的做法是,以普通权限备份,这样就能避免该错误的发生。

rm: 无法删除"/run/user/root/gvfs": 是一个目录 问题的更多相关文章

  1. root密码重置、Linux目录结构和远程连接Linux

    一.root如何重置密码 1. 重启 Linux 系统主机并出现引导界面时,按下键盘上的 e 键进入内核编辑界面 2. 在 linux16 参数这行的最后面追加“rd.break”参数,然后按下 Ct ...

  2. centOS6.4 extundelete工具恢复rm -rf 删除的目录

    PS:补充下,我在fedora 19上运行的时候遇到的一个问题: [root@localhost extundelete-]# ./configure Configuring extundelete ...

  3. Linux下通过 rm -f 删除大量文件时报错:Argument list too long

    Linux下通过 rm -f 删除大量的小文件时出现类似如下错误信息:  -bash: /bin/rm: Argument list too long 如下图所示: 问题原因 如果待删除文件中包含的小 ...

  4. centOS6.4 extundelete工具恢复rm -rf 删除的目录[转]

    原文:http://www.cnblogs.com/patf/p/3368765.html PS:补充下,我在fedora 19上运行的时候遇到的一个问题: 1 [root@localhost ext ...

  5. df: `/root/.gvfs': Permission denied

    在使用oracle账户检查本地磁盘情况时,总是出现df: `/root/.gvfs': Permission denied信息提示. [oracle@rac1 ~]$ df -h Filesystem ...

  6. rm 命令(删除文件和目录)

    rm是常用的命令,该命令的功能为删除一个目录中的一个或多个文件或目录,它也可以将某个目录及其下的所有文件及子目录均删除.对于链接文件,只是删除了链接,原有文件均保持不变. rm是一个危险的命令,使用的 ...

  7. Google Chrome can not be run as root

    Ubuntu运行Chrome出现"Google Chrome can not be run as root"的解决方法 编辑启动文件:/opt/google/chrome/goog ...

  8. can't run as root without the -u switch

    [root@localhost ~]# /usr/local/memcache/bin/memcached can't run as root without the -u switch [root@ ...

  9. Linux中RM快速删除大量文件/文件夹方法

    昨天遇到一个问题,在Linux中有一个文件夹里面含有大量的Cache文件(夹),数量级可能在百万级别,使用rm -rf ./* 删除时间慢到不可接受.Google了一下,查到了一种方法,试用了下确实比 ...

随机推荐

  1. jQuery的XX如何实现?——2.show与链式调用

    往期回顾: jQuery的XX如何实现?——1.框架 -------------------------- 源码链接:内附实例代码 jQuery使用许久了,但是有一些API的实现实在想不通.于是抽空看 ...

  2. ActiveMQ第四弹:在HermesJMS中创建ActiveMQ Session

    Hermes JMS是一个开源免费的跨平台的JMS消息监听工具.它可以很方便和各种JMS框架集成和交互,可以用来监听.发送.接收.修改.存储消息等.这篇文章将讲解HermesJMS如何集成Active ...

  3. [2]. jekyll安装与应用

    一.ruby安装 这里在win下安装ruby,对应自己电脑的操作系统位数,如我的是64位,对应下载Ruby 2.0.0-p353 (x64)这个版本的ruby.然后安装过程就很简单了: 命令行下输入r ...

  4. atitit. 统计功能框架的最佳实践(1)---- on hibernate criteria

    atitit. 统计功能框架的最佳实践(1)---- on hibernate criteria 1. 关键字 1 2. 统计功能框架普通有有些条件选项...一个日期选项..一个日期类型(日,周,月份 ...

  5. SQLite 批量insert - 如何加速SQLite的插入操作

    本人翻译, 原文见: http://tech.vg.no/2011/04/04/speeding-up-sqlite-insert-operations/ 我正在开发一个Android程序, 它使用S ...

  6. Hadoop-2.6.0 + Zookeeper-3.4.6 + HBase-0.98.9-hadoop2环境搭建示例

    1    基本信息 1.1     软件信息 hadoop-2.6.0 zookeeper-3.4.6 hbase-0.98.9-hadoop2 (以下示例中使用的操作系统是Centos 6.5,请将 ...

  7. Scala深入浅出实战经典之 List的foldLeft、foldRight、sort操作代码实战

     Scala 深入浅出实战经典(1-64讲)完整视频.PPT.代码下载:百度云盘:http://pan.baidu.com/s/1c0noOt6 腾讯微云:http://url.cn/TnGbdC 3 ...

  8. Codeforces Round #381 (Div. 1) B. Alyona and a tree dfs序 二分 前缀和

    B. Alyona and a tree 题目连接: http://codeforces.com/contest/739/problem/B Description Alyona has a tree ...

  9. C#怎样去掉对于用Splict分隔的数组中的空值?

    string[] arrayUserId = userIds.Split(new char[] { ',' },StringSplitOptions.RemoveEmptyEntries); 可以去掉 ...

  10. 【转】安装OpenSSL缺失Microsoft Visual C++ 2008 Redistributables的解决方案

    from: http://www.cnblogs.com/luguo3000/p/3539815.html 在安装OpenSSL的时候通常会提示以下错误: "The Win32 OpenSS ...