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.

How can I setup a user on my Ubuntu 10.04 VPS so I can login through FTP and upload .php .html, etc files. I know the default path is /var/www but I'd rather not login through root and upload to there, I'd like to have a separate user.

I've done adduser NAME but all that does is give them a directory in /home and allow SSH acces.

Thanks.

share|improve this question
    
Do you really want to transmit your passwords and files over an unencrypted connection instead of just using SFTP? –  Lèse majesté Apr 22 '12 at 20:39

1 Answer 1

up vote 2 down vote accepted

I suggest you rather use SFTP as it is more secure and modern protocol than the ancient FTP. SFTP uses the standard ssh port (22) and there are some great clients for it, notably WinScp

share|improve this answer
    
I understand that, but can't I have a separate user from root and still use SFTP? –  Archey Apr 22 '12 at 20:44
    
Yes of course! Every user that you add to the machine (with adduser) can access it by default. You just have to be careful as to set the appropriate permissions. –  Tibor Apr 22 '12 at 20:46
    
Alright, well as I said, i've added a user but logging in through SFTP doesn't give me acces to actually uploading the files to be displayed, just gives me acces to the users directory in /home –  Archey Apr 22 '12 at 20:48
    
There are several solutions to that. You can add the user to the group that the directory has (you can check via ls -l /var, then add the user to the group with useradd -G {group-name} username) or you can change the permissions of the /var/www directory altogether, so that anyone can write in it (not such a great idea if you have multiple users) by chmod -R o+wr /var/www –  Tibor Apr 22 '12 at 20:52
    
Got it, thanks :) –  Archey Apr 22 '12 at 21:10

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.