成立 PCMan Facebook 專頁

之前常被許多網友要求加 Facebook,但是數量過多難以管理,大部分也都不認識,無法一一加入,所以成立 PCMan FB 專頁。未來長篇的文章還是會放 Blog 上,而平常的小動態會放在 FB。
另外,現在也可以使用 http://blog.pcman.im/ 來連到本網站

2008年1月25日 星期五

[文件] curlftpfs 和 sshfs 掛載遠端檔案系統

今天首度試用了使用 FUSE 的 curlftpfs 和 sshfs
順利把 ftp 站和 sftp 遠端站台掛到本機 Linux 的目錄底下了

太久沒使用到這些東西,差點忘了 mount 指令怎麼下
最後發現

curlftpfs -o iocharset=utf8, codepage=big5 <本機目錄>
就可以正確顯示 big5 編碼的遠端檔案系統
以前常常在設定 fstab 的時候還記得,現在很久不用改那個,都忘光了...

FUSE 在 ubuntu 下預設無法用一般使用者操作,只能用 root
需要把使用者加入到 fuse 群組

有時可能會需要這個
sudo chmod o+rw /dev/fuse

好像還要這個
sudo chgrp fuse /dev/fuse

搞半天,也不確定最後是怎樣才會動的....
總之,需要一點小設定。

2 則留言:

PCMan's Blog 提到...

後來發現,可以指定環境變數 SSH_ASKPASS,讓 SSH 需要密碼時,執行特定程式來詢問密碼。
以下引用自 SSH 的 man page:

SSH_ASKPASS If ssh needs a passphrase, it will read the
passphrase from the current terminal if it was run
from a terminal. If ssh does not have a terminal
associated with it but DISPLAY and SSH_ASKPASS are
set, it will execute the program specified by
SSH_ASKPASS and open an X11 window to read the
passphrase. This is particularly useful when call-
ing ssh from a .xsession or related script. (Note
that on some machines it may be necessary to redi-
rect the input from /dev/null to make this work.)

PCMan's Blog 提到...

補充:用來取得密碼的程式把跟使用者讀取到的密碼,輸出到 stdout,這樣 ssh 就能抓得到了。這個技巧是從 Gnome SSH Tunnel Manager (gSTM) 的程式碼裡面找到的,將可以被用在 RemoteFSMan 裡面。