ftp地址映射mount到本地
2012-07-02 13:03
225 查看
浅析vsftpd服务器安装配置和将ftp地址mount映射到本地的方法
1.安装ftp 服务器daemon程序
luther@gliethttp:~$ sudo apt-get install vsftpd
luther@gliethttp:~$ sudo mkdir -p /home/ftp_dir/upload
luther@gliethttp:~$ sudo chown ftp:ftp /home/ftp_dir/upload 供匿名用户使用的根目录
2.打开ftp服务器配置文件中anonymous匿名用户访问许可,同时追加匿名用户登录目录.
luther@gliethttp:~$ sudo vim /etc/vsftpd.conf
anonymous_enable=YES
anon_root=/home/ftp_dir
# 这样当ftp://localhost时将显示/home/ftp_dir目录中的内容,它将作为upload,download的基础目录
3. 重启ftp服务器使得修改后的/etc/vsftpd.conf配置参数生效
luther@gliethttp:~$ sudo service vsftpd restart
4.这样可以使用ftp://localhost 登录ftp服务器了
5.如果希望匿名用户可以上传文件和创建文件夹,那么需要打开如下参数
luther@gliethttp:~$ sudo vim /etc/vsftpd.conf
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
# 允许匿名用户读取自己创建的目录里面的内容
anon_world_readable_only=NO
# 允许删除,重命名等操作
anon_other_write_enable=YES
luther@gliethttp:~$ sudo service vsftpd restart
那如何将ftp和smbfs一样作为文件mount到本地机呢,下面我们来看看具体实现:
1.安装curlftpfs文件系统
luther@gliethttp:~$ sudo apt-get install curlftpfs
或者
luther@gliethttp:~$ wget http://ftp.us.debian.org/debian/pool/main/c/curlftpfs/curlftpfs_0.9.1-3+b2_i386.deb
2.mount 指定ftp到本地文件中
luther@gliethttp:~$ sudo curlftpfs -o rw,allow_other ftp://172.16.32.123 /home/ubuntu/ftp
这样目录/home/ubuntu/ftp下就是firefox中 ftp://172.16.32.123浏览到的内容了
3.卸载mount到的ftp目录和卸载普通mount一样,直接sudo umount /home/ubuntu/ftp即可
( 注:
. ftp://172.16.32.123等效于ftp://anonymous@172.16.32.123
. curlftpfs标准命令如下所示:
curlftpfs ftp://username:password@192.168.1.111 /mnt/ftp
)
1.安装ftp 服务器daemon程序
luther@gliethttp:~$ sudo apt-get install vsftpd
luther@gliethttp:~$ sudo mkdir -p /home/ftp_dir/upload
luther@gliethttp:~$ sudo chown ftp:ftp /home/ftp_dir/upload 供匿名用户使用的根目录
2.打开ftp服务器配置文件中anonymous匿名用户访问许可,同时追加匿名用户登录目录.
luther@gliethttp:~$ sudo vim /etc/vsftpd.conf
anonymous_enable=YES
anon_root=/home/ftp_dir
# 这样当ftp://localhost时将显示/home/ftp_dir目录中的内容,它将作为upload,download的基础目录
3. 重启ftp服务器使得修改后的/etc/vsftpd.conf配置参数生效
luther@gliethttp:~$ sudo service vsftpd restart
4.这样可以使用ftp://localhost 登录ftp服务器了
5.如果希望匿名用户可以上传文件和创建文件夹,那么需要打开如下参数
luther@gliethttp:~$ sudo vim /etc/vsftpd.conf
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
# 允许匿名用户读取自己创建的目录里面的内容
anon_world_readable_only=NO
# 允许删除,重命名等操作
anon_other_write_enable=YES
luther@gliethttp:~$ sudo service vsftpd restart
那如何将ftp和smbfs一样作为文件mount到本地机呢,下面我们来看看具体实现:
1.安装curlftpfs文件系统
luther@gliethttp:~$ sudo apt-get install curlftpfs
或者
luther@gliethttp:~$ wget http://ftp.us.debian.org/debian/pool/main/c/curlftpfs/curlftpfs_0.9.1-3+b2_i386.deb
2.mount 指定ftp到本地文件中
luther@gliethttp:~$ sudo curlftpfs -o rw,allow_other ftp://172.16.32.123 /home/ubuntu/ftp
这样目录/home/ubuntu/ftp下就是firefox中 ftp://172.16.32.123浏览到的内容了
3.卸载mount到的ftp目录和卸载普通mount一样,直接sudo umount /home/ubuntu/ftp即可
( 注:
. ftp://172.16.32.123等效于ftp://anonymous@172.16.32.123
. curlftpfs标准命令如下所示:
curlftpfs ftp://username:password@192.168.1.111 /mnt/ftp
)
相关文章推荐
- 本地地址映射远程地址工具ngrok
- Spring-Cloud架构中映射本地绝对地址到项目
- 微信开发,本地地址映射到外网的方法
- 将远程FTP映射到本地文件夹
- webdrive可以把FTP服务器的文件目录映射到本地磁盘
- 把ftp服务器映射为本地磁盘
- java实现根据Linux上的mount的网络路径取到Linux上的mount的本地地址
- 如何访问本地的FTP地址
- 将FTP映射为本地磁盘
- Windows映射局域网共享地址至本地(Net Use)
- 记一次映射公网地址FTP服务问题的解决方法
- 将FTP目录映射为本地磁盘
- Windows 将FTP 映射到本地文件夹 --简化操作
- CentOS安装curlftpfs,映射远程ftp到本地目录
- 使用ngrok工具映射本地项目到外网地址
- NetDrive:将FTP映射到本地
- 把FTP“映射”为本地磁盘
- 把其它地址的共享目录映射到本地
- 地址映射/如何去造一个本地域名