标签搜索

目 录CONTENT

文章目录

Linux 通过 curlftpfs 挂载FTP服务器

沙漠渔
2022-09-26 00:16:22 / 0 评论 / 0 点赞 / 825 阅读 / 844 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2022-09-26,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

安装

Ubuntu系统下:

apt install curlftpfs

当然,如果你是Ubuntu20.04及以上的话,应该在输入curlftpfs会提示如下信息:

Command 'curlftpfs' not found, but can be installed with:

apt install curlftpfs
Please ask your administrator.

照做就可以了,其他系统如何安装请参照网上相关内容,据说centos不好安装,这里就不整理了。

挂载

假设FTP地址是:192.168.1.1,端口号:8021,用户名:username,密码:password

普通挂载(仅root用户可操作)

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

允许所有人读写的方式挂载

curlftpfs -o rw,allow_other ftp://username:password@192.168.1.1:8021 /ftp

只允许所有人读的方式挂载

curlftpfs -o ro,allow_other ftp://username:password@192.168.1.1:8021 /ftp

开机自动挂载

echo "curlftpfs#username:password@192.168.1.1:8021 /ftp fuse allow_other,uid=0,gid=0 0 0" >> /etc/fstab

卸载挂载

fusermount -u /ftp

或者

umount /ftp

注意这里不要有终端或者进程操作该目录,否则会提示busy,参照windows系统下拔出U盘时候的提示哦。

0
广告 广告

评论区