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?

  • Do you have admin access? – Alan Moore Sep 14 '11 at 16:42

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

| 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.