CentOS - 'Unable to Copy files to storage directory" error when uploading files in File Manager after site move

Permalink
Hi all,

I recently moved my C5 site onto a CentOS server running SELinux. All was fine until I tried to upload an image into the file manager. permissions were right everywhere on the /files folder, php.ini was correct, everything common was verified.

I discovered the problem was that after unzipping the web directory into the web root, the security context of the website files were not automatically updated.

Check this article, section 5.1 on updating the correct security context of the files to the correct security context for http:http://wiki.centos.org/HowTos/SELinux....

In summary, you need to run the chcon command to update the context of ALL the files in your C5 directory:

$ sudo chcon -Rv --type=httpd_sys_content_t my_c5_web_directory

 
akashicstudios replied on at Permalink Reply
I forgot to mention, to view the security context of the files do:
ls -Z