Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I connect to my linux server via FTP, my base folder upon login is not my user home directory, but instead '/www'.

'/www' belongs to user root and one of the secondary groups for my user account.

I am connecting via SFTP, using my username/password, and without setting any default root directories. I get the same behavior in multiple clients (Dreamweaver/Cyberduck), both active/passive connect modes.

Does anyone have any idea how to correct this strange behavior?

share|improve this question

migrated from Sep 15 '11 at 4:12

This question came from our site for professional and enthusiast programmers.

Do you have admin access? – Alan Moore Sep 14 '11 at 16:42
up vote 2 down vote accepted

you can do it editing your /etc/passwd file changing the home directory. Eg. username:x:527:527::/home/username:/bin/bash

share|improve this answer
Will I need to restart the machine? Or just the FTP server? .....Also, what is the significance of the numbers (527:527)? The numbers next to my username in /etc/passwd is different. – smhmic Sep 14 '11 at 19:58
You must preserv your number, it´s your account ID. restart is not requeired because ftp will check home path each new login. The passwd file sintax is: The field descriptions are: account:password:UID:GID:GECOS:HOME directory:shell – Rogério Wiethorn Sep 14 '11 at 20:04
Thanks a bunch! – smhmic Sep 14 '11 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .