红联Linux门户
Linux帮助

mount --bind 时要注意的权限问题

发布时间:2007-03-16 01:05:42来源:红联作者:coolbg
  在使用mount --bind olderdir newerdir命令来挂载一个目录到另一个目录后,newerdir的权限和所有者等所有信息会发生变化。如下所示:

  挂载前:

  drwxr-xr-x 2 root root 4096 Mar 12 12:01 pub
  drwx------ 3 staffs staffs 4096 Mar 15 14:08 staffs

  挂载:

  # mount --bind staffs/ pub/

  挂载后:

  drwx------ 3 staffs staffs 4096 Mar 15 14:08 pub
  drwx------ 3 staffs staffs 4096 Mar 15 14:08 staffs

  从上可以看出,挂载后的目录继承了被挂载目录的所有属性,除了名称。
文章评论

共有 0 条评论