权限被拒绝cPanel或PHP文件上传

I am trying to upload a file through cpanel or wordpress admin panel, but cpanel shows permission denied and wordpress requires ftp access (probably for the same reason). What may be the cause of this?

The public_html directory contains files that were copied from public folder of another server via rsync to /home/somename and then I ran cp command to move these files to public_html. And now, all this is happening. Before cp, there was previous version of website that was working fine.

I'm using Centos 6.3 with Apache

Likely ownership issues.

For Centos 6 the default group for Apache is apache

Go to your webroot, and set the permissions to chown -R apache:apache *

Then make sure to set the permissions 0755

You may be better served by creating a new group and adding both yourself and apache to it. Then assigning the permissions to apache:<your new group>