LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   proftpd allow user to specific folder (https://www.linuxquestions.org/questions/linux-general-1/proftpd-allow-user-to-specific-folder-446178/)

GUIPenguin 05-18-2006 04:40 PM

proftpd allow user to specific folder
 
Here is my current proftpd.conf file

Code:

ServerName          "Gentoo FTP"
ServerType          standalone
DeferWelcome        off
DefaultServer      on
RequireValidShell  off

AuthPAM            off
AuthPAMConfig      ftp

Port                666

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.

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.
<Directory />
  AllowOverwrite                on
</Directory>



# chroot for all users of the group ftpuser
DefaultRoot ~ ftpuser

# grant login only for members of the group
<Limit LOGIN>
DenyGroup !ftpuser
</Limit>

# disable root login and require a valid shell (from /etc/shells)
<Global>
RootLogin off
RequireValidShell on
</Global>

UseReverseDNS off
IdentLookups off

# Logging formats
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"

# activate logging

# every login
ExtendedLog /var/log/ftp_auth.log AUTH auth

# file/dir access
ExtendedLog /var/log/ftp_access.log WRITE,READ write

# forr paranoid (big logfiles!)
#ExtendedLog /var/log/ftp_paranoid.log ALL default

Seeing my config, I would like ALL users who are part of ftpuser group access to /var/ftp for read/write access so..

This is what I did:
groupadd ftpuser
chown ftp:ftpuser /var/ftp/

useradd -d /var/ftp -g ftpuser -s /bin/false john
passwd john

now I can login as john with my password, and end up in that directory...I thought if I was in the same group that I changed the directory's group ownership to that I would be able to read/write... I can only read and cannot upload files.

Hope This explains basicly what Im trying to do. Much Thanks.

pljvaldez 05-18-2006 06:18 PM

You did chown, but did you chmod 660 /var/ftp to give the owner ftp and the group ftpuser read/write access?

GUIPenguin 05-18-2006 06:36 PM

lol, when I chmod 660 /var/ftp I get

Status: Connected with 192.168.1.103:666. Waiting for welcome message...
Response: 220 ProFTPD 1.2.10 Server (Gentoo FTP) [192.168.1.103]
Command: USER john
Response: 331 Password required for john.
Command: PASS ********
Response: 530 Login incorrect.

Insted of logging in fine before... I dont know what to think :(

pljvaldez 05-18-2006 06:38 PM

You can always try 777 and then trim down your permissions if it is indeed a permission problem...

GUIPenguin 05-18-2006 06:41 PM

Quote:

Originally Posted by pljvaldez
You can always try 777 and then trim down your permissions if it is indeed a permission problem...

I logged in with scp, I havn't 100% memorized all the chmod numbers, so selected chmod 770, graphicly, giving owner and group execute also...now I can upload/download and delete once I login...Thanks a ton.


All times are GMT -5. The time now is 01:52 AM.