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. AngularJS快速入门指南06:过滤器

    thead>tr>th, table.reference>tbody>tr>th, table.reference>tfoot>tr>th, table ...

  2. 在SecureCRT标签显示IP标题(转)

  3. paip.log4j兼容linux windows 路径设置

    paip.log4j兼容linux windows 路径设置 作者Attilax  艾龙,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog ...

  4. OJ-上海交大-1021. 从前有座山

    html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,bi ...

  5. 如何保证access_token长期有效

    为了使第三方开发者能够为用户提供更多更有价值的个性化服务,微信公众平台开放了许多接口,包括自定义菜单接口.客服接口.获取用户信息接口.用户分组接口.群发接口等,开发者在调用这些接口时,都需要传入一个相 ...

  6. Windows Server 安装 BitLocker

    打开PowerShell(管理员): C:\> Install-WindowsFeature BitLocker -Restart 安装好后,系统会自动重新启动. Windows Server ...

  7. 详解Bootstrap缩略图组件及警示框组件

    缩略图组件 缩略图在网站中最常用的就是产品列表页面,一行显示几张图片,有的在图片底下带有标题.描述内容.按钮等信息.bootstrap框架将这部分独立成一个模块组件,通过类名.thumbnail配合b ...

  8. SQLSERVER新建表的时候页面分配情况是怎样的?

    SQLSERVER新建表的时候页面分配情况是怎样的? 再次感谢sqlskill网站和转载sqlskill网站文章并翻译的人,因为您们的转载和翻译让小弟又学习到新的东西o(∩_∩)o 文章中用到的工具: ...

  9. hdu 1385 Minimum Transport Cost (floyd算法)

    貌似···················· 这个算法深的东西还是很不熟悉!继续学习!!!! ++++++++++++++++++++++++++++ ======================== ...

  10. android网络框架Retrofit 同步异步

    http://blog.csdn.net/jiguangcanhen/article/details/39006197 同步的方式: 1)首先定义要接口.注解Get表示使用的Get请求方式,{user ...