在linux系统中curlftpfs自动挂载ftp

yum install -y http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

yum install -y curlftpfs

mkdir -R /mnt/ftp

chmod 777 /mnt/ftp

echo "curlftpfs -o rw,allow_other,uid=0,gid=0,umask=001 -o nonempty ftp://user:password@xx.xx.xx.xx /home/nas/ftp">>/mnt/a.sh

chmod 777 /etc/rc.local

echo "/bin/bash /mnt/a.sh">>/etc/rc.local

/bin/bash /mnt/a.sh

注意:一定不能写入fstab,否则会导致系统无法正常启动

posted @ 2019-11-15 15:57  Tnu  阅读(1868)  评论(0编辑  收藏  举报