Yet another FTP and multiple users question


#1

Good evening.

I’m sure this has been asked and answered before, but I can’t find it. So here goes.

I have created a domain “my_domain.com” and assigned it to user “user_one”. The file hierarchy looks like this:

/home/user_one/my_domain.com/

(We’ll call this the “domain dir” from now on.)

I want “user_two” to be able to maintain the domain dir, without giving him access to other directories and files owned by “user_one”, such as /home/user_one/Maildir/. So sharing the “user_one” credentials probably won’t cut it.

So I created a group called “mdadmin” and added both users to this group. Then I changed the group for the domain dir to “mdadmin”, and set the sticky bit. So far so good…“user_two” can establish shell access and navigate to the domain dir using a symbolic link that I thoughtfully placed in /home/user_two/; “user_two” can create, edit, and delete files in the domain dir.

Of course you see where this is going. This works fine until “user_two” needs to upload files. The symbolic link doesn’t work in FTP, and “user_two” is unable to navigate to the domain dir.

I suppose I could instruct “user_two” to upload files to his own directory and then establish a shell connection and copy them to the domain dir. But “user_two” isn’t very Unix-savvy.

Am I taking a completely wrong approach here? What should my solution be?

Thanks
-Mark


#2

Hmm…the WinSCP secure FTP client seems to do the trick. Is it really that simple?


#3

You could also consider creating the my_domain.com under user_two. You can do the same trick for accessing the files as user_one, but it’ll be more straightforward for user_two to be able to find files, etc, as everything will be under their home directory.

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options


#4

There a few different approaches you can take; which one is best depends on how you want to operate.

You might start by taking a look at this DH wiki article on sharing a website with another user, as there are a couple of strategies listed there.

When you say you want user2 to be able to “maintain the site”, if you mean add/delete files, upload new files, etc., you might consider installing a filemanger type program. This allows everything to remain under the control of your machine user while allowing another to access the space to do routine maintenance (DreamHost uses suexec, so the script runs as you, and can therefor manipulate files/dirs as you).

Properly installed, such a program can limit the dirs that the use can navigate. There are lots of them out there (hotscripts.com?), so you should have plenty of choice. I have been very happy with ffileman , as it is easy to install oin DreamHost, seems secure, and works very well.

–rlparker


#5

I think I accomplished everything that I intended, but I was just lacking an FTP client robust enough to follow symbolic links. WinSCP seems to do the trick. Cool program. It will definitely be my new FTP client.

-Mark


#6

Hey, That works too! I’m glad you got it all sorted. :slight_smile:

–rlparker