在Debian上挂载FTP服务器,您可以使用curlftpfs
工具
sudo apt-get update
curlftpfs
:sudo apt-get install curlftpfs
mkdir ~/ftp_mount
curlftpfs
挂载FTP服务器。替换your_username
、your_password
和ftp.example.com
为您的FTP服务器的用户名、密码和地址:curlftpfs ftp://your_username:your_password@ftp.example.com ~/ftp_mount
现在,您应该可以在~/ftp_mount
目录中访问FTP服务器上的文件了。
fusermount -u ~/ftp_mount
注意:使用curlftpfs
挂载的FTP服务器不会在系统重启后自动挂载。如果您希望在启动时自动挂载FTP服务器,可以将挂载命令添加到/etc/fstab
文件中。为此,请使用文本编辑器打开/etc/fstab
文件,例如:
sudo nano /etc/fstab
然后在文件末尾添加以下行(替换your_username
、your_password
和ftp.example.com
为您的FTP服务器的用户名、密码和地址):
ftp.example.com /home/your_username/ftp_mount fuse._curlftpfs _netdev,user,idmap=user,transform_symlinks,allow_other,default_permissions 0 0
保存并关闭文件。现在,每次系统启动时,FTP服务器都会自动挂载到指定的目录。