最近加入的商品

0 件商品 共计 ¥0.00

加入购物车
您的购物车中还没有任何商品。

赛普盛科技

Embedded Computer System

专注嵌入式计算机系统

FTP限定用户在特定路径 - NXP i.MX 6

首页    NXP iMX6 应用开发    iMX6 应用经验分享    FTP限定用户在特定路径 - NXP i.MX 6

 

i.MX6Q 已经移植有 ftp ,可在现有的情况下进行配置实现特定路径的访问。
假设被限制用户名为 test,被限制的路径为 /home/test
建用户:在 root 用户下
useradd -d /home/test test // 增加用户 test,并设定 test 主目录为/home/test
passwd test //
test 设置密码
更改用户相应的权限设置:
usermod -s /sbin/nologin test //限定用户 test 不能 telnet,只能 ftp
usermod -s /sbin/bash test //
用户 test 恢复正常
限制用户只能访问/test,不能访问其他路径
修改/etc/stupid-ftpd.conf
vi /etc/stupid-ftpd.conf
user=test zxcvb12345 /home/test 5 A

修改后保存该文件,并执行 sync 命令,重启启动开发板。

 
 

 

 

 
 
2022年2月12日 17:47
浏览量:0
收藏
    • 联系客服

    • 0755 2955 4030
    • 189 2600 3503
    • sales@superfae.cn
    • 服务时间

    • 周一至周五 9:00-18:00
    • 微信二维码