Your apache server probably doesn't run as rick. Have you tried changing the file location to somewhere that your apache process has write permissions?
ps -ef | grep http
should tell you which user owns the apache process.
The directories where your are trying to open the file don't have world write set, so if you and the apache process don't share a group, it won't be able to write there. The groups command will tell you what groups you (and the apache owner) are in.