V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
dunhanson
V2EX  ›  程序员

RockyLinux vsftpd 虚拟用户问题

  •  
  •   dunhanson · Nov 23, 2022 · 1518 views
    This topic created in 1262 days ago, the information mentioned may be changed or developed.

    Secure FTP Server - vsftpd - Documentation (rockylinux.org)

    我是参照 RockyLinux 官方的教程进行安装的,连接没问题,但是上传不了文件

    我尝试了修改目录的用户和用户组,就可以上传了

    但是重启 vsftpd 服务后,就连接不上了

    chown vsftpd.nogroup /var/www/sub-domains/com.testdomain/html
    

    想要的效果:不同的用户对同一个目录有不同的权限,比如 a 用户可以上传和下载,b 用户只能下载

    Supplement 1  ·  Nov 23, 2022
    533 could not create file
    11 replies    2022-11-26 11:20:01 +08:00
    ikidou
        1
    ikidou  
       Nov 23, 2022
    虚拟用户是不是一定得用 PAM ?我就想一个人用,感觉搞复杂了,后面还是自己用 SFTP 和 SCP 了
    feng0vx
        2
    feng0vx  
       Nov 23, 2022 via iPhone
    https://blog.csdn.net/lovefengchenlove/article/details/112394461
    楼主看我以前的笔记,部署过好几次了
    xshell
        3
    xshell  
       Nov 24, 2022
    CentOS6.x 下编译安装 vsftpd-3.0.3
    https://www.dba.kim/Linux/centos-install-vsftpd-3-0-3.html

    几年前安装的,现在还有人用 ftp···
    dunhanson
        4
    dunhanson  
    OP
       Nov 24, 2022
    @ikidou 没办法一开始就搭建的 FTP ,已经接入了一些程序
    dunhanson
        5
    dunhanson  
    OP
       Nov 24, 2022
    @feng0vx 我看下,谢谢
    dunhanson
        6
    dunhanson  
    OP
       Nov 24, 2022
    @xshell 哈哈 没办法,
    dunhanson
        7
    dunhanson  
    OP
       Nov 25, 2022
    @ikidou @feng0vx @xshell 最新版本的 vsftpd 不允许根目录有写入权限?感觉有点坑
    xshell
        8
    xshell  
       Nov 25, 2022
    allow_writeable_chroot=YES
    加下配置文件
    feng0vx
        9
    feng0vx  
       Nov 25, 2022 via iPhone
    @dunhanson 是的,我放在别的目录了,别的目录 own 也不能是 ftp 用户,无奈用了 root 创建,权限 777 ,或者试下楼上的方法
    feng0vx
        10
    feng0vx  
       Nov 25, 2022 via iPhone
    @dunhanson 不是根目录,是 ftp 用户的家目录默认不能作为服务目录
    dunhanson
        11
    dunhanson  
    OP
       Nov 26, 2022
    @xshell @feng0vx 对,用这个配置可以了 allow_writeable_chroot=YES
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   951 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 21:20 · PVG 05:20 · LAX 14:20 · JFK 17:20
    ♥ Do have faith in what you're doing.