Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: ltwally on March 07, 2007, 04:26:57 PM

Title: anon ftp upload?
Post by: ltwally on March 07, 2007, 04:26:57 PM
I am curious if there is a way to enable anonymous ftp uploading from outside the LAN?

Is there a way to restrict this to just one directory (ie. ftp://ftp.mysite.com/uploads/)

Thanks,
ltwally
Title: bump
Post by: ltwally on March 19, 2007, 10:44:02 PM
bump.  Still not sure how to do this -- assuming it's even possible.
Title: anon ftp upload?
Post by: jfarschman on May 09, 2007, 01:41:03 AM
Oh... it's possible, but not really a good idea.  How do you set a quota for the user anonymous?  I mean, it isn't a user, so what if people discover your secret and decide to upload one hundred one gigabyte files?

Will you system be okay in the morning?

Okay... for every lecture and righteous punk like myself there is a reason why you still want to do it.  I'm not evey gonna ask.  You can set it up by modifying the 60AnonymousIBay template.  When you are done drop us a note and we can test it for you :twisted:

Code: [Select]
mkdir -pv /etc/e-smith/templates-custom/etc/proftpd.conf
cp -Ra /etc/e-smith/templates/etc/proftpd.conf/60AnonymousIBay \
/etc/e-smith/templates/etc/proftpd.conf/


Then replace line 76 which should say something like DenyAll with the following:

Code: [Select]
{
my $anonftpwriteable = $ibay->prop('AnonFTPWriteable') || 'DenyAll';
$OUT .= " $anonftpwriteable\n";
}


When this is in place you can now set a special property for each Ibay called AnonFTPWriteable (case sensitive) with a command like this:

Code: [Select]
db accounts setprop <ibay-name> AnonFTPWriteable AllowAll

Leaving this property blank (unset) will result in a DenyAll... so the fact that you have to hand configure this is not a burden because it should be the exception. You can examine your properties with the following line:

Code: [Select]
db accounts show <ibay-name>

Finally, expand the template and it will be live for any new logins... meaning log in again before testing.

Code: [Select]
expand-template /etc/proftpd.conf