Linux, Wordpress

The uploaded file could not be moved to wp-content/uploads/

1. Run the following command. It’ll return the apache service account.

 ps aux | egrep '(apache|httpd)'

the output will be something like this :

root 60179 0.0 0.1 528228 13116 ? Ss 13:33 0:00 /usr/sbin/httpd -DFOREGROUND
apache 60167 0.3 0.5 526080 36192 ? S 13:49 0:13 /usr/sbin/httpd -DFOREGROUND
apache 60113 0.7 0.5 552244 36196 ? S 14:02 0:19 /usr/sbin/httpd -DFOREGROUND
apache 60119 0.6 0.5 554488 38188 ? S 14:20 0:10 /usr/sbin/httpd -DFOREGROUND
apache 60120 0.4 0.4 550264 34196 ? S 14:22 0:06 /usr/sbin/httpd -DFOREGROUND
apache 60129 0.2 0.5 554024 38112 ? S 14:25 0:03 /usr/sbin/httpd -DFOREGROUND
apache 60140 0.2 0.4 549608 33124 ? S 14:28 0:02 /usr/sbin/httpd -DFOREGROUND
apache 60159 0.2 0.4 551384 35124 ? S 14:39 0:00 /usr/sbin/httpd -DFOREGROUND
apache 60160 0.4 0.5 553976 37112 ? S 14:39 0:01 /usr/sbin/httpd -DFOREGROUND
apache 60674 0.5 0.4 548564 32184 ? S 14:42 0:01 /usr/sbin/httpd -DFOREGROUND
apache 60182 0.6 0.2 538336 21140 ? S 14:45 0:00 /usr/sbin/httpd -DFOREGROUND

2. Here the user is “apache”. Now give the permission to this user of you web server folder.

sudo chown -R apache /var/www/html/

Advertisements

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