PureFTPD & Subdirectories

Discussion in 'Installation/Configuration' started by iyeat, Jan 17, 2008.

  1. iyeat

    iyeat New Member

    Greetings all,

    I'm wondering if there is a way, with PureFTPD, to create subdirectories within auto-created FTP home directories.

    For example, let's say I have a user "foo" on my pureftpd server, with a home directory of /home/foo.

    The first time the user foo logs into my server, pureftpd attempts to chroot foo to /home/foo -- and if /home/foo does not exist, it creates it automatically.

    I would also like pureftpd to also create a subdirectory structure within the user's home directory.. in my case for Web hosting customers -- /home/foo/htdocs, /home/foo/cgi-bin, /home/foo/private, etc.

    Is there a way to do this? I searched the docs but didn't find a good answer.

    Thanks!

    Caio
     
  2. unclecameron

    unclecameron New Member

    If you tied it into a skel function somehow, that'd do it
     
  3. iyeat

    iyeat New Member

    Normally if my FTP users were also system users, using /etc/skel would work great...

    Unfortunately, my pureftpd setup uses MySQL as a backend, so I can't use /etc/skel -- However, is there a way to run a script when these directories are created? My setup is using Fedora 8... I'm looking for a solution to within pureftpd itself, however I suppose I could turn to a process external to pureftpd.

    Caio
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Maybe you can do this with a cron job that checks if the directories exist and creates them if they don't.
     

Share This Page