I tried searching the forums, but couldn't find anything that quite fit.
Background:
I am running Drupal 4.6.2 (just upgraded from 4.5.1 yesterday) on a Linux 2.4.30 system (hosted by IXWebhosting.com). It's using Apache/1.3.31 (Unix) PHP/4.3.11 mod_ssl/2.8.18 OpenSSL/0.9.6b FrontPage/5.0.2.2635 mod_throttle/3.1.2 with PHP 4.3.11. My account on the server is keithmcd with a group of keithmcd.
Problem:
Although this problem mainly occurs when I'm using the image module, it also occurs when using a core site feature - such as avatar uploading. All uploaded files are set with incorrect permissions. As I do not have shell access to the server, I cannot fix this myself and must request help from my hosting company every time this happens. With Drupal 4.5, all files were set with owner and group of httpd (httpd:httpd) but I could still see the files at least. However, with Drupal 4.6.2, the files are accessible to the outside world, but I cannot see them on the server when I ftp into it.
Question:
Is there an option somewhere - either in the site code itself, or buried on some configuration page - that I can change so that all uploaded files are set to keithmcd:keithmcd with the correct read/write permissions? I do consider myself knowledgeable with Linux, but no-where near good enough to fully comprehend all the permissions variances with Linux (I only know all the 777, etc because WS_FTP Pro lets me type that number in).
Thanks and let me know if anything needs to be clarified.
Comments
I have the same problem. I
I have the same problem. I take it there isn't anything analogous to impersonate like there is with asp?
I had the same problem...
I fixed it by setting the permissions to 777 using my FTP client. Now I can view the image. I normally avoid setting anything to 777 unless absolutely necessary.
However I do have the Drupal security .htaccess file in the /files/ dir.
Interesting, unfortunately
Interesting, unfortunately because I'm not the owner of the files changing permissions fails for me. If you are experiencing the same problem its possible when you changed permissions it gave ownership back to you so you may be able to remove the write permissions afterwards and it still work.
updates?
HI mcm,
I'm experiencing the same problem - did you find a workaround?
Phil
No I haven't found a
No I haven't found a workaround, I haven't had time to investigate. I know with ASP you can impersonate a user so that actions taken like uploading files can be done under your user details giving you ownership over those files. Unfortunately I couldn't find anything analogous in PHP. Here's the best I could find on that subject:
http://www.makefile.com/files/uimp.pdf
Alternatively if there is a file manager module then that would also allow you alter those uploaded files. I tried a couple myself but they didn't provide the necessary functionality, although I haven't tried them all.