I have a bash cgi script called by apache which should move one file in /var/www/html to another in the same directory. I've set up the relevant permissions with selinux (e.g. chcon to httpd_sys_content_t) and I've changed the read/write permissions of the files/dirs and yet it still returns the following in the httpd error logs:
mv: cannot move /var/www/html/file.txt to /var/www/html/file2.text: Permission denied
Any ideas? There's nothing relevant in the audit log either...
ls -l on /var/www/html/ shows
-rwxrwxrwx. 1 apache apache 157 May 16 15:50 file.txt
ls -l on /var/www/ shows
drwxr-xr-x. 9 root root 4096 May 17 12:28 html