Linux下用curlftpfs挂载FTP服务器 [CentOS]
OS

Linux下用curlftpfs挂载FTP服务器 [CentOS]

装逼爱好者
2011-11-30 / 0 评论 / 15 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2020年09月03日,已超过1324天没有更新,若内容或图片失效,请留言反馈。

A、安装curlftpfs

A.1、安装DAG repository

Fedora可以直接yum install curlftpfs,CentOS不行,得用DAG repository,所以得先安装DAG repository。

rpm -Uhv http://apt.sw.be/RedHat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

A.2、安装 curlftpfs

yum install curlftpfs

B、挂载FTP服务器

B.1、用curlftpfs命令挂载

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

codepage:      编码

username:      FTP用户名

password:       FTP密码
192.168.1.111:  FTP地址
/ftp:           准备挂载到的路径

B.2、卸载挂载

fusermount -u /ftp

umount /ftp

B.3、开放权限

这样其它用户也能读写了,uid和gid改成你自己的id

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

B.4、开机自动挂载
echo "curlftpfs#username:password@192.168.1.111 /ftp fuse allow_other,uid=0,gid=0 0 0" >> /etc/fstab

0

评论 (0)

取消