views:

27

answers:

1

I am having an issue with three older Drupal 6 sites that I can't seem to fix.

Whenever an admin uploads or edits a file, they get file permissions error. I tried setting the files folder to 777 -Rf. The problem seems to stem from the fact that files are getting created as apache instead of the virtualhost user (we use VirtualMin).

After chown and chgrp the files folder to the virtualhost user, everything works fine. Then, the next time a file is uploaded, that file is set to 644 permission and owned by apache.

Is there a configuration or directive needed to tell it to set files as the user with full permissions and not 644 apache?

The modules used to upload are the core Upload, FileField, ImageField, Imagecache and ImageAPI. GD2 is used to handle images.

A: 

How about adding both the virtualhost user and apache to the www-data group, and put all the files in the files directory to the www-data group? Then you can set the permissions to more like 775 on the directories, and the files will be readable as needed.

John Fiala