LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-18-2006, 04:40 PM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
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.

Last edited by GUIPenguin; 05-18-2006 at 06:09 PM.
 
Old 05-18-2006, 06:18 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You did chown, but did you chmod 660 /var/ftp to give the owner ftp and the group ftpuser read/write access?
 
Old 05-18-2006, 06:36 PM   #3
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
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
 
Old 05-18-2006, 06:38 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can always try 777 and then trim down your permissions if it is indeed a permission problem...
 
Old 05-18-2006, 06:41 PM   #5
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
download mail from pop3 elsewhere and send to specific folder robbyridz Linux - Networking 1 03-28-2006 01:16 PM
How do I do a network folder share to specific linux users? Akhran Linux - Newbie 4 03-08-2006 10:19 PM
Jailing a user to a specific folder ONLY GUIPenguin Linux - Security 3 09-23-2005 06:16 AM
How do I FTP into specific folder hrp2171 Slackware 3 10-18-2004 07:30 PM
domain pointing to a specific folder dominant Linux - Software 3 01-28-2004 02:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration