开发者

Uploading / File Permissions

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,开发者_StackOverflow社区 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜