How do I set different permissions to different virtual users in ProFTPd?
I created several users with the ftpasswd
command, but for now they all have permissions to both read and write to their respective folders.
I want to keep those full permissions for some users, but restrict some other users to read-only. Tried googling and reading official documentation, but I can't find any relevant info.
Here's my proftpd.conf, if that helps:
DefaultRoot ~
ServerIdent on "FTP Server ready."
RootLogin off
AllowOverwrite on
RequireValidShell off
AuthUserFile /etc/proftpd/ftpd.passwd
LogFormat default «%h %l %u %t «%r» %s %b»
LogFormat auth «%v [%P] %h %t «%r» %s»
LogFormat write «%h %l %u %t «%r» %s %b»
SystemLog /var/log/proftpd/proftpd.log
TransferLog /var/log/proftpd/xfer.log
ExtendedLog /var/log/proftpd/access.log WRITE,READ write
ExtendedLog /var/log/proftpd/auth.log AUTH auth
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
Port 21
UseIPv6 off
Umask 022
MaxInstances 30
# Set the user and group under which the server will run.
User nobody
Group nobody
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
#############
# SFTP ZONE #
#############
<VirtualHost 0.0.0.0>
<IfModule mod_sftp.c>
DefaultRoot ~
RootLogin off
AllowOverwrite on
AuthUserFile /etc/proftpd/ftpd.passwd
RequireValidShell off
SFTPEngine on
Port 2122
SFTPLog /var/log/proftpd/sftp.log
SFTPHostKey /etc/ssh/ssh_host_rsa_nopass
SFTPAuthMethods password
SFTPOptions AllowInsecureLogin
ServerIdent on "FTP Server ready."
TransferLog /var/log/proftpd/xfer.log
ExtendedLog /var/log/proftpd/access.log WRITE,READ write
ExtendedLog /var/log/proftpd/auth.log AUTH auth
</IfModule>
</VirtualHost>
So, how do I allow writing to their directories for some users, but forbid it to others? Just in case, I don't want to allow anonymous users, so I'm looking for a solution that doesn't include allowing anonymous login