centos下挂载ftp目录 作者: ciniao 时间: 2021-05-20 分类: 技术 * 本文发布时间较久,请自行判断有效性 使用curlftpfs,可以将ftp目录,挂载到centos下,像操作本地目录一样方便快捷。 ####安装 到https://sourceforge.net/projects/curlftpfs/files/curlftpfs/ 源码编译安装 ``` wget http://sourceforge.net/projects/curlftpfs/files/curlftpfs/(版本号)/curlftpfs-(版本号).tar.gz ``` 解压并安装 ``` tar -xvzf curlftpfs-(版本号).tar.gz cd curlftpfs-(版本号) ./configure make sudo make install ``` ####挂载FTP服务器 ``` curlftpfs -o umask=000,rw,allow_other,codepage=utf8 ftp://centos:cloud4c@192.168.17.195 /home/centos/ftp ``` ####开机自动挂载 ``` # 格式 curlftpfs#ftp://user:password@host /ftpdata fuse defaults,allow_other,_netdev 0 0 # 例如 curlftpfs#ftp://ftpadmin:admin123@10.0.4.93 /ftpdata fuse defaults,allow_other,_netdev 0 0 ```  `_netdev`:确保网络文件系统在网络连接成功后再进行挂载 `defaults`:使用默认的挂载选项 `allow_other`:允许其他用户访问挂载点(如果你需要的话) ####卸载挂载 ``` fusermount -u /ftp ``` 标签: none