I have centos CENTOS 5.5 x86_64. apache 2.2 nginx/0.8.54 rails 3 ruby 1.8 passenger Its cpanel. What I am trying to accomplish is to upload an image to /tmp and then move it to the doc root of the nginx server. There will be many images and I want them to be outside of the rails application. I have accomplished this with no problem on ubuntu but I can't use ubuntu in production.
on the rails console logged in as a non root user I can do this
but this same code in the rails app produces Errno::EACCES (Permission denied - /nginx/main/p15s9i103q19331cob1oap1l8hvoae.jpg)
I have tried just about everything I could think of to do with symlinks, I have tried just put the permissions wide open. I changed the owner and group nobody.
Does anyone know what my problem is? And how to work around it?