Linux下用curlftpfs掛載FTP服務器 [CentOS]

A、安裝curlftpfs服務器

A.一、安裝DAG repositorycurl

Fedora能夠直接yum install curlftpfs,CentOS不行,得用DAG repository,因此得先安裝DAG repository。ide

rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/dag/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmui

A.二、安裝 curlftpfs編碼

yum install curlftpfsurl

B、掛載FTP服務器spa

B.一、用curlftpfs命令掛載code

curlftpfs -o codepage=utf8 ftp://username:password@192.168.192.168 /ftporm

codepage:      編碼ci

username:      FTP用戶名

password:       FTP密碼
       192.168.1.111:  FTP地址
        /ftp:           準備掛載到的路徑

B.二、卸載掛載

fusermount -u /ftp

umount /ftp

B.三、開放權限

這樣其它用戶也能讀寫了,uid和gid改爲你本身的id

sudo curlftpfs –o rw,allow_other,uid=0,gid=0 ftp:// username: password @192.168.1.111 /ftp

B.四、開機自動掛載echo 「curlftpfs#username:password@192.168.1.111 /ftp fuse allow_other,uid=0,gid=0 0 0」 >> /etc/fstab

相關文章
相關標籤/搜索