How can I add myself to apache group?

I'm running my CentOS server on my Xserver and what happen is that when I want to upgrade my Wordpress escpecially for now to Wordpress 3.3.2 the problem is that I got

Warning: copy(/wp-admin/includes/update-core.php) [function.copy]: failed to open stream: Permission denied in /wp-admin/includes/class-wp-filesystem-direct.php on line 200

And I understand that this is a permission problem.

Because the owner:group of my wordpress is under apache

So I wish to know how can I add myself to the same group of apache or even in the same group with root using command line? [Terminal]

MORE INFO:

I have password root to do any kind of command that require root password.


Solution 1:

Try the following (if you're in sudoers list) or under root:

 sudo adduser <username> apache

If you're not familiar with sudo, here is a short guide:

Solution 2:

for an existing user

sudo /usr/sbin/usermod -a -G apache <username>