starting pureftpd port
Scott Haneda
talklists at newgeo.com
Sat Sep 19 11:54:04 PDT 2009
On Sep 19, 2009, at 11:03 AM, Ryan Schmidt <ryandesign at macports.org>
wrote:
> On Sep 18, 2009, at 18:12, Scott Haneda wrote:
>
>> http://trac.macports.org/browser/trunk/dports/net/pureftpd/Portfile
>>
>> I wonder if someone can lend me a hand in figuring out the correct
>> way to start this ftpd on Leopard:
>>
>> From the current port file:
>> # Notify the user how to launch the ftpd
>> post-install {
>> ui_msg "\nYou can now start PureFTPd in 3 ways,"
>> ui_msg "either via xinetd, in standalone mode, or"
>> ui_msg "if you're using Mac OS X 10.4 / Darwin 8.x"
>> ui_msg "via launchd(8).\n"
>> ui_msg "If you're under Mac OS X 10.3 or Mac OS X 10.4,"
>> ui_msg "you have to copy ${prefix}/share/doc/${name}/pure-ftpd"
>> ui_msg "to /etc/pam.d and use the '-lpam' flag when"
>> ui_msg "launching pure-ftpd to have PAM working.\n"
>> }
>
> Sounds like the instructions can be simplified now that we no longer
> support 10.3 and can guarantee the presence of launchd
Ok. Sounds easy enough. Reading over the changelog I see they have
added in a new language. I will add that in as a language variant as
well.
>
>> I can start pureftpd and it works from the command line now. Apple
>> has /System/Library/LaunchDaemons/ftp.plist which seems to get the
>> disabled key toggled around depending on how your system
>> preferences are set.
>>
>> If I want to maintain that feature, enable and disable by System
>> preferences, I take it I would need to alter /System/Library/
>> LaunchDaemons/ftp.plist?
>
> I would discourage you from modifying files installed by Apple.
> Instead, this port should install its own launchd plist and you can
> manage that plist on the command line or using gui tools like lingon.
Ok. Agreed. This has the problem of clicking on the FTP server in
Apples System Prefs Sharing pane will cause trouble.
Is it worth a UI messgae to warn users, or are there any more
automatic or graceful ways to deal with this?
I assume this is identical to the Apache ports, and just leave things
alone?
>
>> I am thinking in this case, there are so many ways to start this,
>> the portfile needs to just install a plist and ui_msg where it is
>> and how to enabled it.
>
> I would say the port should use the startupitem keywords like other
> ports do.
The plist is the entire config file. So if you want port ranges,
umask, throttle, mysql, about 50 various configurations, there is no
config file.
It all operates via string items to an array in launchd.
What do you suggest based on that? I was going to include plain.plist,
ISP.plist, and a few others, with instructions on how to copy and load.
There are too many options, one plist can never work for everyone, so
I'm not sure it can be ports managed for the creation.
>
>> I do not know the correct location to put it, and how to configure
>> it so that it is on demand. I believe the Apple ftp dies and only
>> comes alive when a request comes in, which is nice, as you do not
>> have a ftpd running 24/7, only when you need it.
>
> That would be launch-on-demand. The MacPorts startupitem keywords
> don't provide a way to do that AFAIK though it might be a nice
> feature to add somehow. I have already received one request for that
> in regard to the mysql5-server port.
>
I have the server starting on demand. Works wonderfully. With a little
guidance I think I can add a plist base set that would really ease the
starting up of the server.
One thing that is easy is the xferlog, which should go to {prefix}/var/
log/ftp/pureftpd-xferlog.log
That also is defined in the launchd item.
Open to any suggestions, as this is a case of more than just starting
something, starting it sets the starting options.
There appears to be a bug in the ftpd, it will show user and group
colums in ls listings in terminal as an FTP client or desktop client
based. The group will show as the group name you defined, the user
shows as the uid, not the username.
Apples FTP server does not have this problem using the same user and
group in testing.
Does anyone have the knowhow to pin that down and supply a patch?
--
Scott
Iphone says hello.
More information about the macports-dev
mailing list