How to set up an FTP site?


#1

Hello,
I occasionally need to exchange large files with people, so I would like to set up an FTP server, such as ftp://ftp.mysite.com, and allow specific other people to access it with a username and password I provide, without being able to change or upload to my website files.

I would like to be able to set up multiple usernames, so that each username can only access their own subfolder, and in an ideal world I would like to be able to limit the size of files each user can upload.

Is this possible with dreamhost? I read through the wiki and searched the discussion forum, but couldn’t find anything. Thanks very much for your help.


#2

That’s basically how users work when you add them in Panel. You wouldn’t be able to limit the upload size on a per-file basis on shared, but you can limit an overall quota limit on a per-user basis if you want to. In order to set ftp limits based on filesize you’d need to apply for PS and install your own ftp server.

There are other options you could consider, such as using php, perl, or cgi based upload scripts.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

Thanks for the help. I set up another user with a different password, but I don’t see where I can restrict what folders they can access.

Could I set up a new subdomain, then create a user that can only access that subdomain, or something?

Sorry for the basic questions, I’ve read the wiki but I still don’t quite get how all this stuff relates to one another.

Thanks!


#4

You have three options on access:

  1. Give them their own isolated space, such as a subdomain
  2. Remap one (or more) of their directories to your site
    http://wiki.dreamhost.com/KB_/Account_Control_Panel/Domains::_Remap_Sub-Dir
  3. Or create groups with access to certain directories
    http://wiki.dreamhost.com/Unix_Groups

-Scott


#5

Option 1 seems like the most straightforward, so I set up a custom subdomain like ftpaccess.mysite.com, and a user that can only access that domain. However, if you go to that site in a web browser, you’ll still see the files, and I would like to prevent public access to them. I tried re-directing the subdomain to my main domain, but that screws up ftp access too.

I think option 3, setting up User Groups, is above my abilities and most of the people that I would want to exchange files with.

I don’t understand how option 2 would work, could you explain more?

Thanks for all the help!


#6

To hide the directory listing, either put a blank (0 bytes) index.html file in each directory, or create a .htaccess file with just the one line and put it in your (sub)domain’s main directory:
Options -Indexes

This line blocks the display of indexes (file listings) in all directories.

Option 2, remapping, lets your host a directory on your site that’s actually in someone else’s directory. So, example.com/tinkerbell actually resides in user1’s home directory under /tinkerbell. The web server just pulls content from the specified directory instead of a directory in your example.com folder.

-Scott


#7

Aha, that .htaccess file is great. I’ve been reading about it, and you can apparently do all sorts of things with it, like password-protect specific directories.

Thanks so much for all your help, it’s working just like I wanted it to now.