Linux curlftpfs--挂载FTP服务器
2016-04-08 09:36
1361 查看
1、安装
apt-get install curlftpfs
2、简单使用方法
username: FTP用户名
password: FTP密码
192.168.1.111: FTP地址
/mnt/ftp: 准备挂载到的路径
curlftpfs ftp://username:password@192.168.1.111/mnt/ftp
卸载ftp: fusermount -u /mnt/ftp
3、开放权限,这样其它用户也能读写了,uid和gid改成你自己的id
sudo curlftpfs -o rw,allow_other,uid=1000,gid=1000
ftp://dewdew:dewdew@192.168.1.111/mnt/ftp
4、开机自动挂载
sudo echo "curlftpfs#username:password@192.168.1.111/mnt/ftp
fuseallow_other,uid=userid,gid=groupid 0 0" >> /etc/fstab
Mount FTP file system on CentOS
有SFTP后,FTP几乎没有用武之地了,研究 FTP 大多是因为某些软件或服务器只支持 FTP。
1&1独立主机附赠一个跟硬盘容量相等的 FTP 备份空间,此 FTP 只能由 root server 访问,但 1&1 并没有提供现成的备份软件(1&1营销上的失误)。FTP 备份空间对我来说用处不大,但 250 G 的空间空着也是浪费,于是我自创了我的备份方案,此中关键点是如何在 CentOS 上加载FTP 文件系统。
经一番搜索,找到curlftpfs,用它可以加载 FTP 文件系统,但 Fedora 可以直接 yum install curlftpfs,CentOS 里没有,得用 DAGrepository,所以第一步:安装 DAG repository。
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 第二步:安装 curlftpfs
yum install curlftpfs
第三步:没有第三步,已经可以使用curlftps 了。如果要加载 FTP 文件系统
curlftpfs ftp://ftp_host/sub_dir mount_point -ouser="ftp_username:ftp_password", uid=user_id, gid=group_id,allow_other
如果在启动时自动加载 FTP 文件系统,在/etc/fstab 中添加一行
curlftpfs#ftp_uername:ftp_password@ftp_host/sub_dirmount_point fuse rw,uid=user_id, gid=group_id,user,allow_other 0 0
(很多关于 curlftpfs infstab 的介绍使用了 noauto,这样的话,还需执行 mount mount_point 才能真正加载)
卸载 FTP 文件系统
fusermount -umount_point
apt-get install curlftpfs
2、简单使用方法
username: FTP用户名
password: FTP密码
192.168.1.111: FTP地址
/mnt/ftp: 准备挂载到的路径
curlftpfs ftp://username:password@192.168.1.111/mnt/ftp
卸载ftp: fusermount -u /mnt/ftp
3、开放权限,这样其它用户也能读写了,uid和gid改成你自己的id
sudo curlftpfs -o rw,allow_other,uid=1000,gid=1000
ftp://dewdew:dewdew@192.168.1.111/mnt/ftp
4、开机自动挂载
sudo echo "curlftpfs#username:password@192.168.1.111/mnt/ftp
fuseallow_other,uid=userid,gid=groupid 0 0" >> /etc/fstab
Mount FTP file system on CentOS
有SFTP后,FTP几乎没有用武之地了,研究 FTP 大多是因为某些软件或服务器只支持 FTP。
1&1独立主机附赠一个跟硬盘容量相等的 FTP 备份空间,此 FTP 只能由 root server 访问,但 1&1 并没有提供现成的备份软件(1&1营销上的失误)。FTP 备份空间对我来说用处不大,但 250 G 的空间空着也是浪费,于是我自创了我的备份方案,此中关键点是如何在 CentOS 上加载FTP 文件系统。
经一番搜索,找到curlftpfs,用它可以加载 FTP 文件系统,但 Fedora 可以直接 yum install curlftpfs,CentOS 里没有,得用 DAGrepository,所以第一步:安装 DAG repository。
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 第二步:安装 curlftpfs
yum install curlftpfs
第三步:没有第三步,已经可以使用curlftps 了。如果要加载 FTP 文件系统
curlftpfs ftp://ftp_host/sub_dir mount_point -ouser="ftp_username:ftp_password", uid=user_id, gid=group_id,allow_other
如果在启动时自动加载 FTP 文件系统,在/etc/fstab 中添加一行
curlftpfs#ftp_uername:ftp_password@ftp_host/sub_dirmount_point fuse rw,uid=user_id, gid=group_id,user,allow_other 0 0
(很多关于 curlftpfs infstab 的介绍使用了 noauto,这样的话,还需执行 mount mount_point 才能真正加载)
卸载 FTP 文件系统
fusermount -umount_point
相关文章推荐
- Linux crontab --设置例行任务
- Linux cp --复制文件
- Linux clear --清楚终端屏幕,不是cls
- Linux chown --把用户拥有者修改为指定用户或组 2013年7月3日
- Linux 搭建FTP服务器
- 技术第一天
- Linux chmod --改变文件/目录的访问权限
- linux下打印带有颜色的字体
- Linux chkconfig --查询/修改系统服务的运行级别
- Linux chgrp --修改文件或目录的所属群组
- Linux chattr --配置文件案隐藏属性
- linux字符驱动之初见
- Linux chage --密码时效管理
- linux下用 fdisk把新硬盘 分区、格式化、挂载!
- Linux cd --更改当前工作目录
- Linux cat --连接文件或标准输出并打印
- linux字符驱动之自动创建设备节点
- Linux cal --显示日历
- Linux bg ,fg --前后端程序调度
- Linux文件和目录的粘滞位(sticky bit)