Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I enable root login on vsftpd?

Note that this FTP server will not be accessible via WAN/Internet. And I need full permissions for my web development environment (localhost, VirtualBox Guest OS).

I have tried to allow the accounts (via groups) access to /var/www/ for the past 60 - 90 minutes and I only accomplished allowing the users in the group to create folder etc however this permissions did not affect the FTP (same user account) and I still couldn't do commands like creating a folder via FTP.

Any help is appreciated.

Thanks in advance

-Kristian

share|improve this question
    
You can do your work without root access to FTP server. You just need to give your login user enough permissions. If you don't care about the "right" permissions because there is no security risk, you can set the folder permissions to 777! –  Khaled Jul 8 '11 at 16:09
add comment

3 Answers

You're semi-aware of the security implications but I need to emphasise - a local network is still not a secure network, unless the only person who will ever access it is you yourself.

Can you use SFTP instead maybe? Dreamweaver etc supports this (you mention its a web dev environment).

To answer your question: Some FTP servers - possibly including vsftpd - block root logins at the code level. i.e. you have to modify the code and recompile in order to allow it. Redhat ones used to do this at least.

If not, there's vsftp.user_list and vsftpd.ftpusers files which show which users are not allowed to login, root will probably be in there.

share|improve this answer
add comment

You seemed to have started on the correct track for attempting to set permissions for /var/www so you would not have to use root access.

Rather than allowing root via vsftpd, here is a review of the steps to take to open up access of /var/www for users (which will include the user's access when they use ftp). The example gives 'myuser' access.

  1. groupadd www_users
  2. usermod -a -G www_users myuser
  3. chown -R root:www_users /var/www
  4. chmod -R 2775 /var/www
  5. find /var/www -type f -exec chmod 0774 '{}' \;

Now myuser should have full access to create/remove/edit files and directories in /var/www, even when they connect via ftp. The key is in the setgid bit, so that group ownership is taken from the parent directory when a new file/dir is created. Thus assuring all users in the group always have access.

share|improve this answer
add comment

why don't you use openSSH instead? if you is the only one accessing that server, then why use vsftpd? normally I just install openSSH and login to my server using putty, I login as root and I never have had an issue with it..

share|improve this answer
add comment

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.