Setting-up a User Account for a Web Server

Setting up a user account on a remote web server that will manage a website, apache and mysql things.

creating a shell account and linking the home directory to its site’s document root

useradd -g www-data new_user
ln -s /home/user_name /new_directory

creating users and restricting access to his/her own database

CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE db_name;
GRANT ALL ON db_name.* TO 'user_name'@'localhost';

Advertisements

One thought on “Setting-up a User Account for a Web Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s