I’m afraid this might be a dumb question, so please be gentile. I’m hoping for some guidance as how to setup a directory that can be shared amongst a handful of users (3-4). Seems simple enough, right?
My first thought was to setup a Unix group (“share_group”), create user-accounts for each person in the group, then create a “shared_folder” under /home/my_name (the only directory that I appear to have any rights to) which gets assigned to the group “share_group.”
I’m guessing that the problem with this approach is that when a user accesses ftp.mydomain.com that they will be taken to /home/their_name and would never be able to navigate to /home/my_name/shared_folder via ftp.
I am totally hesitant to setup a generic “share user” with one password that gets distributed to everybody; that seems potentially insecure.
Is ftp not the best way to setup a shared directory like this?
I did try setting up a WebDAV directory which seems like the right concept, but seemed much flakier than ftp when uploading files to it. SVN doesn’t seem to be the right concept; plus I don’t want the users to have to download anything special.
Hey, it’s not a “dumb question” at all, and it has been asked on these forums many times, so you are not alone in trying to figure out the best way to do this.
All the approaches you mention are possible, but each of them present complications of one sort or another (as you have already identified).
What I prefer to do in situations such as this, particularly with a relatively small number of users, is to forgo ftp altogether in favor of providing a filemanager type program to allow these users to manipulate files in a given directory owned by my user.
This program/directory can be protected by apache .htaccess based authentication (though some such scripts have their own authentication capabilities) to prevent the general public from browsing to the application.
The principle advantages I see to doing it this way are:
My user retains direct and complete control of all the files (Since DH uses suExec, and the filemanager scripts runs as “me”, all files uploaded via the script are also owned by my user).
Should I decide to limit or restrict the type, or size, of files the sharing users can upload, most of these scripts make that easy to do.
The users require nothing more than a browser to accomplish their work - not even ftp access is reqired.
Should I need to remove a user’s access, or add another user, a simple edit to the .htaccess and .htpasswd files is all that is required (and this can be made even more trivial by using the DH Web control panel’s .htaccess directory protection utility, if I want)
No messing with groups, chmod, or loose directory/file permissions, is needed for them to truly share access to the directory.
There are many mature “free” (free as in “freedom” and free as in “free beer”) scripts that provide this type of functionality available on the web (check hotscripts.com), and most are trivial to install and administer.
The only warning I would give is to be careful of PHP based programs that may limit the size of the files being uploaded (due to DreamHost’s max_upload_filesize restriciton in their default PHP installations) if you anticipate transferring files larger than 7MB (perl based programs do not suffer from this restriction).
I’ve found that this method serves my needs, and my users needs, very well and makes it much easier for me to manage the whole thing.