I have followed this tutorial for setting up my pi as a web server. http://www.instructables.com/id/Turning-your-Raspberry-Pi-into-a-personal-web-serv/?ALLSTEPS

I am confused on which parts of the server are doing what, so here are some questions I have.

  1. Which part of the server controls FTP access?
  2. Are the credentials for using the sudo command on the pi the same for logging into my server through FTP?
  3. How do I view accounts that have access to FTP?
  4. How do I make new accounts that have access to FTP?
  5. What is the general role of MySQL on pi web servers?

When installing MySQL it wanted a 'root' password, so I entered one. But I am unsure what the username for that was. Thanks ahead of time:)

2 Answers 2


The answers here were based on the tutorial provided in the question.

  1. The FTP server controls FTP access.

  2. Yup. Use the same password for your account to log in via FTP.

  3. All accounts* that can log into the pi can log into it via FTP. Not sure how to view them though. I have users that can log in via FTP that are not part of the "ftp" group.

  4. Simply make new user accounts. You can do that using:

    adduser <username>

  5. MySQL is needed by websites that need a MySQL database. You can also make a database-driven website where the content reflects whatever is in your database.

The root username for MySQL is "root" (without quotes).

  • 2
    Step 4 can be simplified to adduser <username> Dec 12, 2015 at 0:38
  • @DiederikdeHaas Answer updated. Forgot about that :)
    – Aloha
    Dec 12, 2015 at 1:05

PandaLion98 is right. As far as #3, all users that can login can ftp (even root if you enable it) Here is a way to view all the user accounts that should be a real user.

awk -F':' '{ if ( $3 >= 1000 && $3 <= 60000 ) print $1 }' /etc/passwd

On my pi the above outputs,

pi@raspi:/etc $ awk -F':' '{ if ( $3 >= 1000 && $3 <= 60000 ) print $1 }' /etc/passwd
pi@raspi:/etc $

What this does is list the username ($1) of any user in the passwd file with a uid ($3) of 1000 to 60000. Anything below 1000 and above 60000 is for system uids.

And on Mysql, the password you entered for the "root" is the password you setup as the root user's password for Mysql. To give you an idea about the login of Mysql,

$ mysql -uroot -pMysqlPass123

Notice how unlike most programs Mysql has no space or equal sign after -u and -p.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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