Friend needs FTP access

wordpress

#1

I’d like to give my friend FTP access to just one folder with his own username and password for the FTP. Is this possible? Couldn’t find it in the knowledge base… Thank you very much!


#2

i’d like to know how to do this too.


#3

The recommended set up for something like this is to use our Subdirectory Remapping feature. You redirect a section of your website (like domain.com/friend) to point to a directory underneath the new ftp user you set up (/home/friend/domain.com). In that set up, any requests for domain.com/friend just go directly to the files under the second user’s home directory, bypassing your own user’s home directory altogether. You will not have access to the files from your original ftp user and the two users will be totally distinct and separate.

You can find that here:
https://panel.dreamhost.com/index.cgi?tree=domain.mapsubdir&

Note that files in our system can only be easily* writable by one user at a time so there’s no way to set up a section of your website that multiple users access simultaneously.

  • I say ‘easily’ because it is possible using user groups but there are significant caveats and would be difficult to maintain if you don’t have a good grasp of UNIX file permissions.
  • Dallas
  • DreamHost Honcho

#4

Thanks Dallas! That’s great news!

So for example i have a site which has it’s images on the server under mywebsite.com/files/images/myfriendsimages/ folder, and it can be accessed through the web as http://mywebsite.com/files/images/myfriendsimages/picture.jpg.

If i remap this folder as mywebsite.com/myfriendsimages than my friend can access this folder through ftp? Where do I set-up the username and password for him? Also, how would he reference the images he uploaded into that folder? Is it http://mywebsite.com/myfriendsimages/picture.jpg ?


#5

To add a new user, go here and click the ‘Add New User’ link at the bottom:
https://panel.dreamhost.com/index.cgi?tree=users.users&

After the new user (we’ll call that user ‘friend’) is set up, log in as that user and create a folder that you want the friend to use to upload pictures. You can call it whatever you want so ‘myfriendimages’ would work.

After you create that directory, use the Subdirectory Remapping feature to map mywebsite.com/myfriendsimages to /home/friend/myfriendsimages. Then your friend will login as ‘friend’ and put files into ‘myfriendsimages’ and then those pictures will be accessible as http://mywebsite.com/myfriendsimages/picture.jpg

The Subdirectory Remapping maps a URL to a folder on the server and lets you incorporate files from multiple user home directories under a single website.

Note that your original ftp user will not see the files in the myfriendsimages folder because they are stored under the ‘friend’ account.

  • Dallas
  • DreamHost Honcho

#6

Gak!

Help! Maybe I did this all incorrectly …

I host several domains at DH. I’m the only user on my account with Panel access.

I created a new domain last week (all nameservers are correct).

I added a new user to my account (the user that will be running that domain). This is the first time I’m ever adding a user to one of my domains so that the user can FTP to that domain.

I installed WordPress – while logged in to the Panel as myself – for that user to his domain.

On the Web Services page I have that user listed as the “Run CGI as” person.

When I log in as myself via FTP to my account, I see all the domains I am hosting, and under this new domain I see all the WordPress folders and files.

When I log in as the new user via ftp to his account using ftp.domain.com, I only see a “logs” and a “maildir” folder and nothing else.

What did I do wrong?!

doh!


#7

Did you set the domain to run as the new user when you originally added the domain or did you change it after the domain was already set up?

It should work either way, but that difference may expose a glitch somewhere.

The new domain folder should ONLY show up under the new ftp user and you should not see it under your original ftp user at all.

  • Dallas
  • DreamHost Head Honcho/Founder

#8

I had not yet created the new user when I added his domain, so the domain was set to be me (dvg).

I just got an email from Sarah in support saying I need to switch the domain to be set to the new user and that I will then need to run the WP one-click install again. I can only guess that it’s because the first WP install I did made the WP installation (and files, folders, etc.) to be “owned” by me and that the new user cannot now see them.

I don’t really have an “original FTP user”; that’s just me. I can see everything in my account (as I assume I should!).


#9

Ah, you misunderstood. He’s talking about when you actually log in to FTP, not the Web Panel.
FTP has to do with the operating system’s concept of users and the filesystem, not the DreamHost web site concept of WebIds.

Each user on the operating system gets a home directory - a location for their own files and directories. When you set a domain up, you specify a directory (“Web Directory”) that is located in a users home directory as the location of the web-accessible files. When a person logs into FTP as that user, they get to manage the files. A person logging in as a different user doesn’t.

I think your probelm may have been that you adding the domain, the “Web Directory” directory was created in your home directory as expected. Then you added the user and switched the “Web Directory”. However this “switch” probably does not automatically create the Web Directory in the new user home directory much less automatically copy the files to the new directory.

:cool: Perl / MySQL / HTML CSS


#10

I miss something I’m afraid

I am user1 and I have domain.com setup under this user.

I want to give access to a subdir domain.com/subdir/subdir to a friend.

I create user2 and map http://domain.com/subdir/subdir to /home/user2/domain.com/subdir/subdir

What server / parameters do I need to give to my friend to connect with a ftp software ?

server : domain.com
user : user2
pass : user2_password

This doesn’t work it seems… Can’t connect in ftp to domain.com with user2… please help !!


#11

For FTP, prepend ftp to the domain:

example.com -> ftp.example.com

There will be no “domain.com” directory for user2 until you login as user2 and create it.

:cool: Perl / MySQL / HTML+CSS


#12

Thanks a lot, it works now.

I think my problem was the delay to use user2 after its creation. BTW it works also without appending ftp.


#13

Ok, time to beat the horse…

I know I’m doing something wrong, or I’ve missed something badly…

I’ve created an FTP user for the account. How do I give this user access to a specific folder in MY account, while still retaining the permissions? I want to give a friend some access into my account so he can test/play with PHP and SQL a bit.

I’ve tried the remap sub-dir too, but that doesn’t ‘appear’ to give me the option to point is user to an already created folder.

Thanks in advance!

================================
I’d give my right arm to be ambidexterous!


#14

What you are asking for is not possible in our system. It requires a level of file permission granularity we do not provide at this time.

I can go into the nitty gritty details if you want, but the short answer is its not possible and its not something we can change.

Note that there are ways to do it with the standard UNIX file permission model, but it typically requires the end-users to be knowledgeable of file permissions and aware of how their actions impact those file permissions and that’s more than we can expect from our average user.

  • Dallas
  • DreamHost Head Honcho/Founder

#15

Dallas,

Thanks for clearing that up. I was just so easy on another host that I have used, I assumed that (though there is a lot more freedom serverside) the same thing could be done over here.

Thanks again!!

================================
I’d give my right arm to be ambidexterous!