FUSEを一般ユーザ権限で
この記事は古いです。同様の内容の新しい記事は「FuseFSを一般ユーザ権限で」です。
FUSEを使ったモノを一般ユーザ権限で使おうとすると問題が起きる。
問題
前回のFuseFSまでのインストールの後、一般ユーザ権限でさっそくFuseFSのサンプルを使おうすると。。。
% ruby hello.rb mnt fuse: failed to exec fusermount: Permission denied /usr/lib/ruby/site_ruby/1.8/fusefs.rb:13:in `for_fd': no implicit conversion from nil to integer (TypeError) from /usr/lib/ruby/site_ruby/1.8/fusefs.rb:13:in `run' from hello.rb:20
だってさ。
解法
fusermountは一般ユーザ実行権限を持たせてないからこうなる。ので、
% sudo chmod +x /usr/bin/fusermount
でいいかな?っておもったけど。。。
% ruby hello.rb mnt fusermount: failed to open /dev/fuse: Permission denied /usr/lib/ruby/site_ruby/1.8/fusefs.rb:13:in `for_fd': no implicit conversion from nil to integer (TypeError) from /usr/lib/ruby/site_ruby/1.8/fusefs.rb:13:in `run' from hello.rb:20
これは。。。。
% sudo chmod 666 /dev/fuse
かな。
もっといいやり方がありそう。