安装
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盘时候的提示哦。
评论区