Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 5 down vote accepted

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:

share|improve this answer
    
it said command not found? –  Ali Apr 21 '12 at 12:10

for an existing user

sudo /usr/sbin/usermod -a -G apache <username>
share|improve this answer

If the user exists already, use

sudo usermod -g <groupname> <user>

If it is a new user,

sudo useradd -g <groupname> <user>
share|improve this answer
    
use -a -G for secondary group. Otherwise it's the primary group –  Jeremy Dec 1 at 16:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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