dropbox-type FTP folder and limited access

Web hosting discussion, programming, and shared and dedicated servers.
10 posts Page 1 of 1
by geolink » Thu Apr 18, 2013 1:07 am
Hi, folks.

Does anyone know if I can set up a 'dropbox' folder in my FTP space into which I could allow others to deposit files when they've logged in anonymously? I would not want them to be able to peruse/read/write any other files or folders at that same level, but it would be fine if they could *see* other files in that same 'dropbox' folder.

Thanks for any suggestions!
by thulsa_doom » Thu Apr 18, 2013 1:56 pm
Generally you make a dropbox by creating a directory with only write and execute permissions for everybody but yourself (eg 733 or rwx-wx-wx).
John Fitzgerald
Sonic Technical Support
by geolink » Thu Apr 18, 2013 2:09 pm
Thanks, John. I've done that. But will this create the type of dropbox I mentioned in my post, rights-wise and all? Or would I have to set 733 permissions for all other folders in my FTP space?

The goal is to let them log in as anonymous and be able to read/write into just one folder, and not to be able to see into any others.

Thanks,

Tom
by joemuller » Thu Apr 18, 2013 3:09 pm
If the dropbox is the only thing you need to have fully public-accessible, you can simply put it in your public_html directory with the appropriate permissions.

On shell:

Code: Select all

mkdir /home/g/geolink/public_ftp/dropbox/
chmod -R 733 /home/g/geolink/public_ftp/dropbox/
People can then access your dropbox via:
ftp.sonic.net/pub/users/geolink/
I'm a proud employee of Sonic.net! :-)
by geolink » Thu Apr 18, 2013 3:38 pm
Thanks, Joe. This is actually for login rrnet, not geolink, so I'll just substitute where necessary. Also, you meant public_ftp and not public_html, right?

And to beat the same poor horse again... Would these users, logged in with anonymous, be able to change directories and see into any other folders w/o me also changing those folders to 733?

Thanks.

Tom

--proud long-time member of Sonic.net! <g>
by joemuller » Thu Apr 18, 2013 3:58 pm
Tom,

No worries - glad to help. I did mean public_ftp - that's shared to everyone, just like public_html (though you can lock that down with .htaccess, to an extent).

They can see anything in the public_ftp folder - though changing the permissions should lock down other directories.

-- Joe
I'm a proud employee of Sonic.net! :-)
by geolink » Thu Apr 18, 2013 5:13 pm
Thanks, though I think I see the flaw in this setup. Anonymous users don't have rights to PUT files, right? I'd mentioned earlier that the goal is to let them log in as anonymous and be able to read/write into just one folder. Maybe the anonymous login is the barrier to this working? I didn't want to give this person the account's login info.

Thanks. Sorry if I'm misunderstanding.
by joemuller » Thu Apr 18, 2013 5:38 pm
I just attempted to use the steps above on my personal account, and it definitely works. The only problem is that, by having such a setup, anyone can drop as many files as they want into the directory.

You'd want to have some sort of pseudo-anonymous login with limits in place, but I don't think that's possible with the current setup. You could potentially do this with a web-based upload system, but the same recommendations regarding access control apply.

-- Joe
I'm a proud employee of Sonic.net! :-)
by geolink » Thu Apr 18, 2013 6:33 pm
Ok, I've successfully created a folder in my public_ftp space, set it to 733 and can upload a file. Is there any way to put a size quota on that folder or on my entire public_ftp space? That would take care of the risk of some questionably-motivated person jamming files in there. (I only need at most 500mb available in there.)

Thanks.

Tom
by joemuller » Fri Apr 19, 2013 2:42 pm
Unfortunately, there is no mechanism that I know of to limit the amount of data that can be uploaded via FTP. If you're comfortable with it, you could write some sort of cron script that cleans out the directory periodically, but there are probably better solutions out there.
I'm a proud employee of Sonic.net! :-)
10 posts Page 1 of 1