I currently have a website with an upload page. We have users who want to upload lots of data (gigabytes), and the website is proving to be fickle. As a result, we're considering letting the users have sftp access to upload data to a dropbox file.

How can we set that up using Ubuntu linux? I'm not a very competent sysadmin, so we've just been locking everything down but the web and ssh/sftp for our own use, then only allowing web access through passwords that only work on the site via the site's database.

I'd think that we'd need to set permissions on a user so that:

  1. the user has a home directory.
  2. that directory is write-only for them
  3. the user can access no other directories on the system
  4. the user cannot execute any programs whatsoever
  5. The user can, essentially, only upload files via sftp, on the standard ports for that service.

How can I do this? As a side note, the user will be using our own upload client that also collects some domain-specific information, like what the upload is for; I'm not sure that that detail matters, but I mention it because the user will not get to run ls to get a directory listing, so a standard ftp client may not be useful to them.


Try scponly. There is a Ubuntu package.

| improve this answer | |
  • This looks great, thanks! I'll test it out shortly. – mmr Jun 5 '10 at 0:59
  • This is probably the right way to do things-- only problem is that the package maintainer appears to assume that I'm going to read his code to figure out how to do things, which is just irritating. – mmr Jun 6 '10 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.