Hi,

> Hi guys, i have a web server with IP based virtual hosts (3-4) and i
> want to make a ftp account for every host. I'm thinking to use proftpd
> and to make the root dir in /var/www so then every user will have home
> directory to different web account (/var/www/domain1, /var/www/domain2,
> etc.). For the ownership of the files i'm thinking to start the ftp
> server with user and group apache to make possible for the web server to
> read the files. Is my ideas right?
> I'm open for other ideas :)

well, in general you are right, but please allow me some comments:

ProFTPD is supporting alternative user/passwd sources like files or a
mysql db. While mysql is a good solution for mass hosting, I would go for
"authuserfile" in your case. This allows you to work with FTP users
without adding any system users to your system. As well you can also give
the user an invidual UID and GID, so I would suggest the UID and GID of
apache.

I am not sure, if the ftpasswd program to handle this accounts is included
in the gentoo package. You will find it in the contrib directory of
proftpd.

Usuage: (example taken from an SuSE System I worked on last week):
ftpasswd --file /usr/local/etc/proftpd.user  --home <HOME> --name <NAME>
--shell  /bin/false  --passwd --uid 30 --gid 8

proftpd.conf:
AuthUserFile /usr/local/etc/proftpd.user
RequireValidshell off

the syntax should be clear, otherwise just ask.

If I am correct you have to recompile ProFTPD with the correct Useflag.
Also please note, that you still can login as a system user. To prevent
this you have to add the authorder option to your proftp.conf

Hope that helps

Stonki


-- 
gentoo-user@gentoo.org mailing list

Reply via email to