linux ftp 配置

Linux FTP的安装与配置 - 最美的痕迹 - 博客园

Linux FTP的安装与配置

ftp安装部分,操作步骤如下:

可以使用yum命令直接安装ftp

# yum install vsftpd

ftp服务的开启与关闭命令:

开启:# service vsftpd start

关闭:# service vsftpd stop

安装成功后,可以在本地使用ftp软件连接,默认账号是虚拟机的账号和密码。

在linux中添加ftp用户,并设置相应的权限,操作步骤如下:

1、环境:

ftp为vsftp 被限制用户名为test。被限制路径为/home/test

2、建用户:在root用户下:

# useradd -d /home/test test //增加用户test,并制定test用户的主目录为/home/test




# passwd test //为test设置密码

3、更改用户相应的权限设置:

# usermod -s /sbin/nologin test //限定用户test不能telnet,只能ftp




# usermod -s /sbin/bash test //用户test恢复正常 # usermod -d /test test //更改用户test的主目录为/test

4、限制用户只能访问/home/test,不能访问其他路径:

修改 # /etc/vsftpd/vsftpd.conf 如下:

chroot_list_enable=YES //限制访问自身目录

# (default follows)

chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

编辑 vsftpd.chroot_list文件,将受限制的用户添加进去,每个用户名一行

改完配置文件,不要忘记重启vsFTPd服务器。

# /etc/init.d/vsftpd restart

5、如果需要允许用户修改密码,但是又没有telnet登录系统的权限:

# usermod -s /usr/bin/passwd test //用户telnet后将直接进入改密界面

    </div>
    <div class = "postDesc">posted @ <span id="post-date">2013-06-27 10:37</span> <a href='http://www.cnblogs.com/yangjinjin/'>最美的痕迹</a> 阅读(<span id="post_view_count">...</span>) 评论(<span id="post_comment_count">...</span>)  <a href ="https://i.cnblogs.com/EditPosts.aspx?postid=3158245" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(3158245);return false;">收藏</a></div>
</div>
<script type="text/javascript">var allowComments=true,cb_blogId=109356,cb_entryId=3158245,cb_blogApp=currentBlogApp,cb_blogUserGuid='73c9be2e-725c-e111-aa3f-842b2b196315',cb_entryCreatedDate='2013/6/27 10:37:00';loadViewCount(cb_entryId);</script>


$(function () { setTimeout(function () { incrementViewCount(cb_entryId); }, 50); deliverAdT2(); deliverAdC1(); deliverAdC2(); loadNewsAndKb(); loadBlogSignature(); LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid); GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate); loadOptUnderPost(); GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate); });
</div><!--end: forFlow -->
</div><!--end: mainContent 主体内容容器-->

<div id="sideBar">
    <div id="sideBarMain">

公告

        <div id="calendar"><div id="blog-calendar" style="display:none"></div><script type="text/javascript">loadBlogDefaultCalendar();</script></div>

        <DIV id="leftcontentcontainer">
            <div id="blog-sidecolumn"></div><script type="text/javascript">loadBlogSideColumn();</script>
        </DIV>

    </div><!--end: sideBarMain -->
</div><!--end: sideBar 侧边栏容器 -->
<div class="clear"></div>
</div><!--end: main -->
<div class="clear"></div>
<div id="footer">


Copyright ©2016 最美的痕迹



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值