Creating a new user for a existing domain


#1

Hi,

Today I needed to provide FTP access to someone else in a domain hosted here. So, I went to the domains page, clicked to edit a domain. Selected the create a new user action, and everything works fine.

The problem is, the files weren’t moved from the old user to the new one. So I got a Dreamhost default site, and that domain files were in the same place as before.

Of course, I transfered the files myself by this time, but it’s really bad to have a function on the panel that don’t work the way it should. Hope someone from Dreamhost reply to this post!

Thanks!


#2

You are running up with a technical limitation. There is only one user per domain. http://wiki.dreamhost.com/One_User_Per_Domain_Policy

Dreamhost made this choice long ago. At few other hosts you can have multiple users for a domain, but with that set up you also typically can’t have multiple domains under one user, which is the choice dreamhost made.


#3

In fact, I’m fine with the fact that just one user can control a domain. The problem that I’ve experienced was not related to that.

I created a new user (X) for a domain that was controlled by another user (Y). The process created a new user called X in the machine, but it didn’t copied (or moved) the domain files from user Y to user X home directory.

This makes the process of changing the user of a domain very painful.

Vinicius


#4

I see what you are saying now. I didn’t clearly understand after the initial post.

Of course you are assuming that anytime someone creates a new user for an existing domain that they want the files moved. In fact, they may not, they may want a clean slate with the original files left untouched.

If your new user has shell access, you can copy the files over very quickly using ‘rsynch’ or ‘sfpt’. The advantage to learning how to do this is speed. If you pull the files down to your local machine and re-upload them it might in fact take a very long time. Using these other methods however you can be done in seconds.


#5

Hi!
Yeah, sure. I did that. I just thought that the copy of the files was the default behavior!

Thanks for your reply!


#6

There’s (usually?) a checkbox displayed that lets you select whether to copy files when changing the user on a domain:

[attachment=2]

It’s on by default, but if you unchecked it the files definitely wouldn’t get copied!


#7

Just FYI, the file moving feature has worked for me before, but didn’t work the last time i tried it. I assumed it was because I had too many files to move (around 3GB) though.


#8

I just ran into this same issue today with all of my domains.
I am in the process of hardening my sites, so I created a single user for each domain/subdomain (4) and kept the “move files” checkbox ticked by default. Every domain failed to copy, and I am not running huge amounts of files – one WP install and maybe a few dozen files on the other domains.
Why did this not work? This is the second “feature” of DreamHost’s that has not worked for me.

Anyway, I now need to manually move everything. I need some advice…
There are two users that manage a domain and it’s corresponding subdomain – do I move both of those domain folders into the user folders or does something else need to happen first? I don’t want to copy everything to the user folders and find that I missed a step. If it is as simple as just copying, great.

Thanks for any help.


#9

Good stuff! I applaud you on your choice to take the time do this.

[quote=“mattesque, post:8, topic:56646”]Every domain failed to copy, and I am not running huge amounts of files – one WP install and maybe a few dozen files on the other domains.
Why did this not work?[/quote]

Jobs like moves are queued, so it might be that the copy script had not run yet.

My first advice would be to “wait a bit”, in case it’s a queue issue.

Simply copy over the folder that each user “owns”. If anything is broken after that you’ll need to determine why, and how best to rectify it. If the sub relies on the domain (or vice-versa) it might be a case that both the domain and subbie are probably better running under a single user - unless you have time to dig into the code in order to separate any such reliance which would be more in tune with your account-hardening undertaking.