FTP和共享文件夹有什么区别

FTP和共享文件夹有什么区别,第1张

ftp是文件传输协议,文件共享是另一种协议,你可以在地址拦看到的访问ftp服务器的时候
ftp://url
文件夹是
file://path还有,ftp可以对来访者进行控制管理,会超时的共享貌似不会
是有点类似,但文件夹共享只能在局域网里面,但在广域网上还是用ftp方便文件共享是使用了windows系统内的帐户,对系统安全会有影响,但ftp可以另外建帐户,有服务程序控制

在系统中任何的文件夹都可以借助于ftp服务成为共享文件夹,建立文件夹只需要在磁盘位置右键选择”新建文件夹“即可,ftp共享的设置方法可以参考如下 *** 作:
1、在win7上使用ftp服务,需要先安装iis服务,打开
"控制面板",选择"程序"
->
"打开或关闭windows资源",在d出的窗体里找到
“internet信息服务”,展开后选择“ftp服务器",然后点击"确定",此时windows开始更新功能资源列表。
2、然后,自己在iis管理器中添加ftp站点
在d出的窗口,选择ftp共享目录即可。

方法/步骤
1
 
首先按照前面步骤打开Internet信息服务窗口,在该窗口的左侧显示区域,用鼠标右键单击目标FTP站点,从d出的快捷菜单中单击“属性”
命令,打开目标FTP站点的属性设置窗口,单击该窗口中的“安全帐号”标签,进入到标签设置页面(如下图);
检查该标签页面中的“允许匿名连接”项目是否处于选中状态,要是发现该选项已经被选中的话,那我们必须及时取消它的选中状态;

其次单击上图中标签页面中的“浏览”按钮,从随后出现的“选择用户或组”设置窗口中,依次将“bbb”、“ccc”用户帐号选中并导入进来,再单击“确
认”按钮,返回到Internet信息服务列表窗口;
2

着打开服务器系统的资源管理器窗口,找到D盘下面的“aaa”目录,然后用鼠标右键单击该目录窗口中的子文件夹“bbb”,并执行右键菜单中
的“属性”命令,打开B部门信息上传目录的属性设置窗口,单击该设置窗口中的“安全”标签,再在该标签页面中单击“添加”按钮,从d出的“选择用户或组”
列表中将“bbb”用户帐号选中,再单击“确定”按钮返回到安全标签设置页面(如下图所示),
并在该页面中赋予“bbb”用户帐号合适的访问权限。之后在下图界面中选中Everyone帐号名称,并点击“删除”按钮,以便取消其他员工对“bbb”
文件夹的访问权限,最后单击“确认”按钮结束“bbb”上传目录的访问权限。
按照相同的设置 *** 作步骤,我们再将信息上传目录“ccc”的安全权限只授予“ccc”用户帐号,如此一来我们就顺利完成了对B部门、C部门所管理的信息上传目录共享权限间的相互限制了。
验证共享访问安全
 
 为了检验B部门、C部门的员工在访问FTP服务器时,是否只能看到本部门的上传信息,我们现在就以FTP服务器IP地址为
192168110为例尝试FTP登录访问 *** 作。首先打开IE浏览窗口,并在该窗口址址框中输入URL地址
“ftp://192168110”,单击回车键后,IE会自动d出一个身份验证对话框,在其中正确输入用户名“bbb”及对应帐号的访问密码,再

单击“登录”按钮,在随后d出的浏览页面中,我们会发现B部门的员工以“bbb”用户帐号登录FTP服务器时,只能访问并管理“bbb”信息上传目录,而

看不到“ccc”信息上传目录中的内容。当我们再次在IE浏览窗口中输入URL地址“ftp://192168110”,然后在身份验证对话框中输

入“ccc”用户帐号及对应该帐号的密码时,我们会发现C部门的员工以“ccc”用户帐号登录FTP服务器时,只能访问并管理“ccc”信息上传目录,而
看不到“bbb”信息上传目录中的内容。
当B部门的员工登录进FTP服务器后,想尝试在IE浏览窗口中输入URL地址
“ftp://192168110/ccc”,来达到浏览C
部门的信息上传目录时,IE会自动d出相关提示信息,告诉我们没有浏览对应目录的权限。通过上述验证 *** 作,我们发现不同部门的员工共享使用同一台FTP服
务器时,只要进行合适的共享权限设置,就会有效避免部门信息被轻易外泄的风险。

FTP服务器的搭建,我要实现的需求是:
不允许匿名访问,因为我的机器不想让谁都能登录上来,随便获取文件,
需要锁定一个目录,因为在家里,我需要给媳妇下载一些 韩剧之类的东西,媳妇会来我机器下载,但是我不想让他随意 *** 作我的东西。
万一删除我的配置文件,我就惨了(吐槽一下韩剧:媳妇问我,你都没看过韩剧怎么知道它不好看呢,我说:我没吃过屎 但是知道它一定不好吃!)
另外,需要本机也能访问,因为我要做一些关于FTP的测试。
  不单独建立FTP用户,FTP也使用ubuntu桌面的用户进行登录和 *** 作,
我还不希望FTP开始启动。
好了 我们开始安装,很简单。
sudo apt-get install vsftpd
30秒内估计就能安装完。
下面开始配置:
首先备份配置文件。
linuxidc@ubuntu:/etc/init$ cd /etc/
linuxidc@ubuntu:/etc$ sudo cp vsftpdconf vsftpdconfold
接下来就是开始配置了,
咱们就针对需求来:
1 不允许匿名访问,因为我的机器不想让谁都能登录上来,随便获取文件,
配置如下:
23 anonymous_enable=NO
2需要锁定一个目录,因为在家里,我需要给媳妇下载一些 韩剧之类的东西,
 媳妇会来我机器下载,但是我不想让他随意 *** 作我的东西。
 万一删除我的配置文件,我就惨了
配置如下:
152 local_root=/home/linuxidc/公共的/FTP共享文件

备注:[FTP共享文件] 这个文件夹是我新建出来的
另外,需要本机也能访问,因为我要做一些关于FTP的测试。
配置如下:
26 local_enable=YES
  不单独建立FTP用户,FTP也使用ubuntu桌面的用户进行登录和 *** 作,
配置如下:
120 #chroot_local_user=YES
121 chroot_list_enable=YES
122 # (default follows)
123 chroot_list_file=/etc/vsftpdchroot_list
这里需要/etc/vsftpdchroot_list 这个文件,如果没有请新建:
sudo gedit /etc/vsftpdchroot_list
内容如下(例如我桌面的用户名为linuxidc):
duoduo
其实就是把你的用户名写进去
我还不希望FTP开始启动。 一会单独说!
贴出我的配置文件。
# Example config file /etc/vsftpdconf
#
# The default compiled in settings are fairly paranoid This sample file
# loosens things up a bit, to make the ftp daemon more usable
# Please see vsftpdconf5 for all compiled in defaults
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options
# Please read the vsftpdconf5 manual page to get a full idea of vsftpd's
# capabilities
#
#
# Run standalone vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript
listen=YES
#
# Run standalone with IPv6
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one This parameter and the listen parameter are mutually
# exclusive
#listen_ipv6=YES
#
# Allow anonymous FTP (Disabled by default)
anonymous_enable=NO
#
# Uncomment this to allow local users to log in
local_enable=YES
#
# Uncomment this to enable any form of FTP write command
write_enable=YES
#
# Default umask for local users is 077 You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files This only
# has an effect if the above global write enable is activated Also, you will
# obviously need to create a directory writable by the FTP user
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone The default is to display GMT The
# times returned by the MDTM FTP command are also affected by this
# option
use_localtime=YES
#
# Activate logging of uploads/downloads
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data)
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like The default is shown
# below
#xferlog_file=/var/log/vsftpdlog
#
# If you want, you can have your log file in standard ftpd xferlog format
# Note that the default log file location is /var/log/xferlog in this case
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests Not
# recommended for security (the code is non-trivial) Not enabling it,
# however, may confuse older FTP clients
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file
# ASCII mangling is a horrible feature of the protocol
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to linuxidc's FTP service
#
# You may specify a file of disallowed anonymous e-mail addresses Apparently
# useful for combatting certain DoS attacks
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpdbanned_emails
#
# You may restrict local users to their home directories See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot()
# (Warning! chroot'ing can be very dangerous If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpdchroot_list
#
# You may activate the "-R" option to the builtin ls This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default
#
# This option should be the name of a directory which is empty Also, the
# directory should not be writable by the ftp user This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoilpem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoilkey
#
local_root=/home/linuxidc/公共的/FTP共享文件
现在可以重启FTP了。
linuxidc@ubuntu:/etc$ sudo service vsftpd restart
vsftpd stop/waiting
vsftpd start/running, process 303
OK 看到这些 证明配置文件没有问题,FTP启动了
下面直接访问FTP 看看:
linuxidc@ubuntu:/etc$ ftp 127001
Connected to 127001
Welcome to linuxidc's FTP service
Name (127001:linuxidc): duoduo
Please specify the password
Password:
OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed
Service not available, remote server has closed connection
ftp>
居然报了一个500的错误
vsftpd: refusing to run with writable root inside chroot()
。其实这里是需要特殊说明的,原因出在这里
120 #chroot_local_user=YES
121 chroot_list_enable=YES
122 # (default follows)
123 chroot_list_file=/etc/vsftpdchroot_list
我们用
chroot_list_enable=YES 和 chroot_list_file=/etc/vsftpdchroot_list配合使用,使得只有在vsftpdchroot_list中配置的用户才能登录FTP。
对于这要的配置有一个特殊的要求,就是vsftpdchroot_list里面配置的用户,对于前面local_root配置的目录不能有写的权限!
也就是/home/linuxidc/公共的/FTP共享文件 这个文件夹 对于linuxidc这个用户不能有写的权限,
我们为了额 *** 作方便可以这么做:
sudo chown -R root:root /home/linuxidc/公共的/FTP共享文件/
这样,linuxidc这个用户对于/home/linuxidc/公共的/FTP共享文件没有写权限了,
现在重启FTP 重新登录看看:
linuxidc@ubuntu:/etc$ ftp 127001
Connected to 127001
Welcome to linuxidc's FTP service
Name (127001:linuxidc): duoduo
Please specify the password
Password:
Login successful
Remote system type is UNIX
Using binary mode to transfer files
ftp>
OK FTP 好了 可以登录了
但是我刚才 sudo chown -R root:root /home/linuxidc/公共的/FTP共享文件/ 这个 *** 作
还带来了一个麻烦。就是FTP共享文件在我桌面登录时,不能任意复制粘贴 *** 作文件了,但是我还要必须保持linuxidc用户对[FTP共享文件]
这个文件夹不可写。这该怎么办呢?
其实很简单,
cd /home/linuxidc/公共的/FTP共享文件
sudo mkdir FTPFILES
sudo chown -R linuxidc:duoduo FTPFILES
这样 就保持了 FTP共享文件 文件夹linuxidc用户不可写,但duoduo用户用可以在桌面登录时任意 *** 作文件了,只不过此时的随意范围在FTPFILES文件夹范围呢了。
这样基本FTP服务基本搭建完成了。
对了 忘记了一点。就是不让FTP服务开机启动。 *** 作如下:
linuxidc@ubuntu:/etc/init$ cd /etc/init/
linuxidc@ubuntu:/etc/init$ sudo cp vsftpdconf vsftpdconfold
编辑配置文件
sudo gedit /etc/init/vsftpdconf
将#start on runlevel [2345] or net-device-up IFACE!=lo 修改为start on runlevel [345] 如下:
#start on runlevel [2345] or net-device-up IFACE!=lo
start on runlevel [345]
stop on runlevel [!2345]
这次重启FTP 重启系统 彻底完成。

在系统中任何的文件夹都可以借助于ftp服务成为共享文件夹,建立文件夹只需要在磁盘位置右键选择”新建文件夹“即可,ftp共享的设置方法可以参考如下 *** 作:
1、在win7上使用ftp服务,需要先安装iis服务,打开 "控制面板",选择"程序" -> "打开或关闭Windows资源",在d出的窗体里找到 “Internet信息服务”,展开后选择“Ftp服务器",然后点击"确定",此时Windows开始更新功能资源列表。
2、然后,自己在IIS管理器中添加FTP站点
在d出的窗口,选择ftp共享目录即可。

分类: 电脑/网络
问题描述:

我们因为可能不会同时上网,我电脑上有个一百多M的文件想传给别人,我没用过FTP,有谁可以告诉我哪个FTP软件好用

讲的详细点,一步一步

解析:

用cutftp这个软件吧。

CutFtp的详细使用步骤
很简单的!~

1安装CuteFTP软件

软件下载地址:
musicflasher123/hanlan/jhhb/cuteftp501rar

这里提供的下载未测试,不知道是什么版本

软件下载以后,解压缩,然后直接运行cuteftpexe文件一步步安装即可。

2获取FTP服务器地址、用户名、密码

你只有获取了FTP服务器的访问授权,才能够正常访问FTP服务器。一般情况下,你可以通过以下几个渠道获取FTP服务器的访问授权:

(1)注册免费服务器空间

(2)购买付费服务器空间

(3)获取共享FTP服务器帐号

你所获得的FTP服务器的访问授权包括以下3个内容:

(1) FTP服务器地址(比如IP地址218433125或者域名地址flasher123)

(2)用户名

(3)密码

有了FTP服务器授权法宝,你就可以继续下面的步骤了。

3设置FTP站点连接

运行CuteFTP,CuteFTP窗口设计得层次分明,功能一幕了然。我们只需通过鼠标简单的拖曳 *** 作就可以完成上传和下载的工作了!不过,别着急,现在还不能完成具体的上传和下载任务,因为,从图1可以看出,现在你还没有连接到任何一个FTP服务器(服务器目录列表窗口还是空白的)。要想连接到一个被授权的FTP服务器,你必须将前面第2点说明的那些授权对象(FTP服务器、用户名、密码)在CuteFTP软件中进行设置。具体方法如下:

(1)打开站点管理器对话框

选择文件|站点管理器命令(或者单击工具栏最左边的站点管理器按钮),打开站点管理器对话框,(2)新建连接站点

在站点管理器对话框中,单击新建按钮,建立一个新站点,你可以根据所建立站点的特点重新输入一个站点名称。

(3)输入服务器地址、用户名和密码

单击你新建的站点名称,在右边对应的文本框中输入授权的服务器地址、用户名和密码,你可以参考图2所示进行设置。除了服务器地址、用户名和密码这三项是根据你自己的授权进行设置以外,其他参数一般都和图2所示一致。

(4)取消防火墙设置

有些服务器有一些特别的要求,比如会进行一些高级参数的设置,比较常见的是要取消防火墙设置。单击编辑按钮,d出设置对话框,在这个对话框中单击高级标签,然后将窗口中的使用PASV模式和使用防火墙设置两项前面的复选勾去掉,最后单击确定按钮, 至此,你的FTP服务器连接就基本设置好了,在图2所示的对话框中单击连接按钮,这样就可以连接到服务器上了。如果连接一切正常的话,图1所示的“服务器目录列表”窗口中就会将远端授权给你的服务器目录列表出来。

如果你要上传文件,只需用鼠标将“本地目录”窗口中的文件拖曳到“服务器目录列表”窗口中的相应目录即可,下载文件也是同样的方法。另外,你还可以根据授权情况,在“服务器目录列表”窗口中进行建立目录、删除文件、文件重新命名等 *** 作。

1、从“计算机”上登陆,先打开“计算机”,在最上方输入栏中输入登陆FTP服务器命令(ftp://ip地址),然后按回车。

2、d出“登陆界面”后输入登录账户和密码,点击“登录”。

3、账号密码核对成功,就会进入FTP服务器上目录列表,如果该账号权限足够大就可以下载上传修改里面的文件了。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/10610292.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-10
下一篇 2023-05-10

发表评论

登录后才能评论

评论列表(0条)

保存