SSH SFTP WebFTp useage


#1

In trying to set up a SFTP user I followed the instructions at
http://wiki.dreamhost.com/SFTP

But when I try and use SFTP ( winSCP or WebFTP.dreamhost.com or FileZilla)
I cannot see any of mysite folders or files.

But, I can see what looks like the complete folder structure of the server from ROOT up.

My new user was created from my site panel.
It does show that is is a member of the group dpnnnnnnn
When created, it was given a home folder of /home/newusername/ (where newusername is the name I gave it.)

Something is going wrong, as I cannot get to see any files related to mysite.

When I connect using WebFTP.dreamhost.com (trying both secure and unsecure modes), there are only two folders showing. These are Maildir and logs
I created a new folder named “wtf”.

here is a link to the screenshot of my new user
http://i42.tinypic.com/2pq3lzk.png

here is a screenshot of the root access I can get
http://i42.tinypic.com/qmyg77.png

John


#2

[quote]My new user was created from my site panel.
It does show that is is a member of the group dpnnnnnnn
When created, it was given a home folder of /home/newusername/ (where newusername is the name I gave it.)

Something is going wrong, as I cannot get to see any files related to mysite.[/quote]
Nothing is wrong. Each user gets their own home directory to store their files in.

The web server (software called Apache) is what makes your web site work. The web server will look for files in only one of your users directories. And this directory is specified as the “web directory” for a fully hosted domain or subdomain.

As for the root access, nothing special. DreamHost has regular FTP “chroot” restricted to the home directory of the user you logged in as. The user home directory path is /home/username. Configure your SFTP software to use that as an “initial remote directory” if you want to avoid having to change directories manually. BTW “chroot” is a process where software or the operating system makes it appear as if a certain directory is the root (top most level) directory. Hence you can think of / in FTP as a shortcut to /home/username.

Ultimately if you’re going goal is to share management of files for a web site with another person, it is not going to be as easy as you think. Sure, obviously with SSH/SFTP access a user can access the home directory of another, but then there are ownership and permissions issue that affect how the web server and CGI applications handle the files. Are you familiar with the concepts involved?

:cool: openvein.org -//-


#3

Thanks Atropos7.

I am beginning to understand what has gone on. But I am really dissapointed that the wiki help does not explain it better.
I signed up with a username say, abcdefg and that username connects by default to folder home/abcdefg from where i can see the folder where the web site is served from. No problems with that!

But, when I create an account for SFTP so that I can work securely with site files, as recommended by the wiki and others here, the account created as, say, abcsecure, has a home folder of home/abcsecure. When I connect as directed within the wiki I cannot see my web site folder, so that is useless when trying to upload new files for the site to host.

I have now discovered that, by trial and error, that I should not be trying to connect with my new secure login (abcsecure) to its home/abcsecure folder, but to the folder of the base hosting account home folder, i.e. /home/abcdefg/ This is what is not spelled out in the wiki.
Oh for CPanel again! :frowning:

I would expect, that a child account of abcdefg would have its home folder as a child folder of the creator, not starting at the same root!

John


#4

Is there some reason you’re not just setting your original user up as an sftp user and logging in using that original account?

Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!


#5

Lensman

Yes. Because this option was not datailed in the wiki. I was following the wiki and it advised me to set up a new user with shell/sftp access. Maybe I missed a section where it also explains I can change my original account access.
I will see if I can change by original user account to sftp. That makes much more sense. Thanks a bunch!

John


#6

Actually, I think where you missed this was that you didn’t follow the links on that http://wiki.dreamhost.com/SFTP page you were reading to get the “full story”.

Note that the pages states:

[quote]Requirements and Setup

To use SFTP, the user account you want to access must be configured with the proper account type. You can do this in the control panel under (USERS > MANAGE USERS) then clicking on the “Edit” link for the user account in question.

Then select either of these “User Account Type:” options.

  • “Shell account - allows FTP plus ssh/telnet/sftp access.”
  • “SFTP account - sftp (SSH ftp) file transfer access only.”

Please see Enabling Shell Access for full instructions on how to do this. [/quote]

Had you tried the method in the first paragraph above, you would have been “editing” an existing user instead of creating another. Had you followed the link above, you would have seen sections for both options (make an existing user SFTP capable, or make a new SFTP/SSH capable user).

I’m not sure how to make that more clear, but I am open for suggestions.

(edited because I found the page he was looking at - doh! Hey, it’s been a long day) :wink:

–rlparker
–DreamHost Tech Support


#7

Thanks.
The page I was working from is
http://wiki.dreamhost.com/Enabling_Shell_Access

The 1st section steps 1 thru 7

A short sentence in that section might have prevented me going astray!

I think I was directed there from a page describing using winscp and SFTP.

I have now switched my original account to SFTP via the Manage Users panel and will use that for ftp stuff from here on.

John


#8

Thanks! I think I understand, but I’m wondering if you just missed the phrase in the opening paragraph of that page that reads:

… and the following section below those first 7 steps, where “Enabling/Disabling shell access for an existing user” is listed?

Actually, I think it might be improved/clarified like this:

What do you think? Would that help make it more clear that there are two choices, and both will gain you SFTP and shell access?

Edit: - Actually, as that is really a separate issue (SFTP enabling) now I’m leaning more toward just modifying the introductory paragraph to more clearly indicate there are three sections here, which I think would encourage the reading of the whole page and solve the problem - again your input is appreciated.

–rlparker
–DreamHost Tech Support


#9

My confusion stems from the fact that I saw myself as an account “owner” and any one else I add as a “user”. I now see that I am just the “original user”

My daytime job is writing complex business software for Windows and MS-SQL users, hence my understanding of “user” was not matching the usage in the wiki. :frowning:

Maybe some clarification could be added that would not trip me up. Maybe [color=#CC0000] and modifying[/color] [color=#CC6600] the original user or other[/color] [color=#CC0000] existing user to grant or remove shell access.[/color]

I hate technical writing. I often use the acronym “sue” (= Stupid User Error) when talking with fellow programmers. Looks like this time “sue” refers to me :stuck_out_tongue:

John


#10

Ah! Ha ha ! I know exactly what you mean. :slight_smile: . The term “user” can be a very ambiguous term on DreamHost, the meaning of which is highly dependent upon context, and perspective, as illustrated by all the different ways the term is used. It’s enough to make one’s head explode.

Thanks for the input on this … I’m gonna study on it a bit and see what I can do to clarify it for others.

–rlparker
–DreamHost Tech Support


#11

'Nix is not Windows.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#12

Now you tell me :smiley:
and Veesta is not Windows!

John


#13

Not a truer word spoken. Windoze is my OS of choice, but Vista = bleh!

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost