Page 1 of 1
share for non users (upload)
Posted: 12 Sep 2012, 05:40
by Puma
Hello,
does someone knows a simple way for non users to upload a file to a public folder without access to storage etc.?
With ftp or webinterface with an useraccount you can see storage etc.
How can for example my friend upload a file to my bubba (with internet acccess).
Puma
Re: share for non users (upload)
Posted: 12 Sep 2012, 06:00
by RandomUsername
You could create a new user and specify a different ftp home directory. For example, if you comment out the line in /etc/proftpd/proftpd.conf that says "DefaultRoot" I think a user will be automatically put into their own home directory. You will need to restart the ftp service (/etc/init.d/proftpd reload).
Re: share for non users (upload)
Posted: 13 Sep 2012, 10:27
by Gordon
I have DefaultRoot set to /home/ myself (the trailing slash is important). Every user that has a valid login can thus see every other users directories and enter them if they have sufficient rights.
I've created a new folder in /home named ftp which is where the anonymous users go to
Code: Select all
<Anonymous /home/ftp>
<Limit LOGIN>
AllowAll
</Limit>
User ftp
Group nogroup
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Cosmetic changes, all files belongs to ftp user
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
# Limit the maximum number of anonymous logins
MaxClients 10
# Allow write to the upload folder
<Directory upload>
<Limit STOR>
AllowAll
</Limit>
</Directory>
# Limit WRITE everywhere in the anonymous chroot
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
</Anonymous>
I think there are some other directives you can use on the upload folder, but I've added ACL's to that folder
Code: Select all
# file: upload
# owner: nobody
# group: users
user::rwx
group::rwx
group:users:rwx
mask::rwx
other::-wx
default:user::---
default:group::---
default:group:users:rwx
default:mask::rwx
default:other::---
So essentially this means anonymous users can write files in the upload folder but not read them back. How's that?