How to change ownership for an Apache User

Here is how to change the ownership for an Apache user and creating log folder for both Mysql and Apache.

root@xxxxxxxx:~# cd /
root@xxxxxxxx:/# cd var
root@xxxxxxxx:/var# cd www
root@xxxxxxxx:/var/www# ls
xxxxxxxx.com info.php
root@xxxxxxxx:/var/www# chown -R www-data:www-data xxxxxxxx.com/
root@xxxxxxxx:/var/www# mkdir /var/log/apache2
root@xxxxxxxx:/var/www# mkdir /var/log/mysql
root@xxxxxxxx:/var/www# chown mysql /var/log/mysql

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s