LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PROFTPD advanced Configuration (https://www.linuxquestions.org/questions/slackware-14/proftpd-advanced-configuration-251428/)

fritz001 11-05-2004 05:58 AM

PROFTPD advanced Configuration
 
well i've just readed proftpd howtos but no help answers found. hm.... maybe i'm steel a noob :(

anyway here is my problem

i want to setup a ftp server on my linux machine as follow

i have 5 directories /fat32-1, /fat32-2,/fat32-0, /docs_tutorials, /upload

so

1. when i login as root to have full acces to all 5 directories

2. when i login as amember of users or ftp group to be abble to acces only in read-only mode /fat32-2, /fat32-0,/fat32-1

3. when i login as anonymous to have readonly access to /doc_tutorials and fullaccess to/uploads


so far i did'n found an advanced proftod tutorial

flashingcurser 11-05-2004 02:19 PM

Seems like you've answered your own question, unless I'm misunderstanding you.

Set the group for /fat32-1, /fat32-2, /fat32-0 -- to the users or ftp group. Make sure that all of your users are in the "ftp" and "users" groups. (see /etc/group) Make sure that whatever group owns the directories has read and execute permissions. chmod 750 ./directory -- should do it. (You will probably want root to own the directories)

Set up a private area with a file path like--
/home/ftp/private/ -- then the 3 directories above

Then set a group for anonymous, make sure that /doc_tutorials & /uploads directories are in the "anonymous" group. Make sure that the ftp/anonymous user (see proftpd.conf) is in the "anonymous group". Again chmod 750 should do it.
Set up an anonymous (public) area with a file path like--
/home/ftp/public/ -- then the 2 directories above


One side note: IT IS VERY BAD TO LOG INTO AN FTP SERVER AS ROOT--ftp sends passwords as clear text. IT IS ALSO BAD IDEA FOR ANONYMOUS USERS TO HAVE UPLOAD!

A better solution is to set up a special group for uploading and only put those users that need to upload in that group. Then set permissions like chmod 770 ./directory (with root ownership) If you must be absolutely be root, use scp or sftp.

Beyond all the unix file permissions-- proftpd.conf has many options. One is (I think, I'm on a winders box right now)

DefaultRoot ~

Stick it in the global. This sets the users starting directory as their change root. Thus if the "anonymous" user on your system has a home dirctory that just contains just /doc_tutorials & /uploads then thats all the farther he will go. This directory should be below the starting directory. His (their) home directory should be /home/ftp/public in this example /home/ftp/public/uploads etc... For a global (who you called "root") user (who needs access to both sets of directories). The home directory global user should be /home/ftp

Other users could have their (not a great way) home directories set to /home/ftp/private -- this would be kind of a pain if they have real shell logins...

proftpd.conf has anon config examples in the file -- you will have to set up upload areas for your uploads. See proftpd website -- hehe I have to get back to work

:)

fritz001 11-05-2004 03:05 PM

Set up a private area with a file path like--
/home/ftp/private/ -- then the 3 directories above

hm.....well how to do it exactly ????


last edit....
i've just returned from www.proftpd.org

i've readed those docs, but no clue how to manage my problem !!


for now i'm using SERV-U FTP on my win machine, i didn't think config a ftp serv on linux could be hm...."a little" difficult



All times are GMT -5. The time now is 02:04 PM.