10
10

More than 5 years have passed since last update.

sshfsで他のサーバをマウントする

Last updated at Posted at 2013-11-29

sshfsのインストール

CentOSを想定(実際に試したのはCentOS6.3)

  1. yum-prioritiesプラグイン導入

    $ sudo yum -y install yum-plugin-priorities
    $ sudo vi /etc/yum.repos.d/CentOS-Base.repo

    # base,updates,extrasディレクディブで priority=1

  2. RPMforgeリポジトリ導入

    $ wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
    $ sudo rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
    $ sudo yum -y update rpmforge-release

  3. sshfsインストール

    $ sudo yum install fuse-sshfs --enablerepo=extras
    $ sudo modprobe fuse

マウントする

  • 詳しくはヘルプを

$ sshfs [user@]host:[dir] mountpoint [options]

他のユーザと共有する

  • ディフォルトでは、他のユーザがマウントしたディレクトリはアクセスできないのでオプションを用いる
    • -o allow_root : rootのアクセスを許可する
    • -o allow_other : (rootを含む)他のユーザのアクセスを許可する
10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10