[FTP] Read rights FTP

luppie

Verified User
Joined
Jul 28, 2005
Messages
41
For a customer i want to have the possibility to give users only read acces is this possible ?

Situation :

User : ded
domain : ded.com

The owner of this domain creates a FTP user : [email protected] and gives him rights on a custom dir.: /home/ded/ftp

Now the user wants that [email protected] can only read all folders on the FTP en has a possebility to upload in /home/ded/ftp/

Is this possible to arange (or can i edit some config files to get this done) ?
 
This can't be done through DirectAdmin, however it might be possible making the changes in the proftpd configuration itself.
 
Well i am not afraid to do some settings in proftpd, i only dont know what to set where :confused:

If you can only point me in the right direction i wil be so thankfull.
 
We just did this yesterday for a client. For CentOS3 and generic Proftpd (not DA).

So this is NOT a HowTo; just an idea... And it's not been tested on DA.

No guarantees except that if you make backups of all changed files first, you can restore them if it doesn't work.

All as root.
Code:
1) create a user

adduser username

2) create username's password:

passwd username

3) Delete the user directory at /home/username; it
won't be needed.

rm -Rf /home/username

4) Change username's listing in /etc/passwd so
user could be in the same username and group,
and NOT have bash login rights:

username:x:507:507::/home/users/dirname/sbin/nologin

where dirname is the name of the directory you
want the user's ftp session to log into, and 507
isn't necessarily 507 but whatever it actually is.

5) Create a "pseudo anonymous" container inside
the proftpd.conf file (right under the example
anonymous container)
=========
<Anonymous ~username>
   User         username
   Group        username
 </Anonymous>
=========
The first line created an anonymous login to the
dirname stored in /etc/passwd, as username.

The User and Group lines make username part of
that anonymous login.

User username has only anonymous access,
which means NO write access or any other
access to change anything.
-- 
Jeff Lasman <[email protected]>
NoBaloney Internet Services ([url]www.nobaloney.net[/url])
1254 So Waterman Ave., Suite 50, San Bernardino, CA  92408
voice:  +1 909 266-9209
6) if you run proftpd as a service restart it; if you
use inetd or xinetd to start proftpd instances then
you don't have to restart anything.

That's it. It should work.

If it doesn't, restore your backups and restart proftpd if required, and let us know your results so we can refine this further.

(Things that may break it are, for example, if you need to add an AllowUser line; you don't for generic Proftpd.)

Experiment if you must, but you're entirely on your own.

Jeff
 
Back
Top