1

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:)

asked Dec 11, 2015 at 9:43

2 Answers 2

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).

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

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

answered Dec 12, 2015 at 7:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.