Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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