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. Jenkins Git 中文乱码问题解决

    解决方法: x:\Jenkins\jenkins.xml 新增蓝色粗体标记参数(-Dfile.encoding=utf-8),然后重启Jenkins服务,完毕! <arguments>-X ...

  2. Java-基础练习2

    1.利用文本编辑器输入课堂上练习的Hello.java,并在JDK环境下编译和运行.请将程序编译.运行的结果截图,填入下框中. class Hello{ public static void main ...

  3. paip.自定义java 泛型类与泛型方法的实现总结

    paip.自定义java 泛型类与泛型方法的实现总结 ============泛型方法     public static <atiType,retType> retType reduce ...

  4. this和super用法的总结

    在学习this和super关键字时,发现它们有诸多相同点,同时这两个关键字非常常用,现对它们做以下的总结. 一.概况 This: This指代当前对象,this()指代当前对象的其他构造函数 Supe ...

  5. Spring第一天

    Spring框架 1.1:了解Spring Spring的核心是提供了一个容器,主要通过 BeanFactory(接口)来创建和管理对象,一般我们用它的子类ApplicationContext 来创建 ...

  6. apache url rewrite 的RewriteRule参数详解

    apache url rewrite 的RewriteRule参数详解 我们经常会在apache那边对一些url进行一些重写操作,那么就会涉及到很多的重写策略的选择,比如重定向的方式,参数的处理,规则 ...

  7. 微信开发——OAuth2.0授权

    微信公众平台最近新推出微信认证,认证后可以获得高级接口权限,其中一个是OAuth2.0网页授权,很多朋友在使用这个的时候失败了或者无法理解其内容,希望我出个教程详细讲解一下,于是便有了这篇文章. 一. ...

  8. inotify-tools使用方法介绍

    原文 inotify-tools 是为linux下inotify文件监控工具提供的一套c的开发接口库函数,同时还提供了一系列的命令行工具,这些工具可以用来监控文件系统的事件. inotify-tool ...

  9. Android Studio no debuggable applications解决方案2

    android studio 默认是没有开启debuggable 功能的,在tools里打开该功能即可,Tools->Android->Enable ADB Integration. 刚设 ...

  10. windows地址转发

    netsh interface portproxy add v4tov4 listenport=8080 connectaddress=192.168.8.108 connectport=8080 把 ...