Many times when trying to change colors on our linux server for the garland theme or a theme we derived from there, drupal show problems with creating files:

copy(files/color/my_garland-aff77da3/menu-collapsed.gif) [<a href='function.copy'>function.copy</a>]: failed to open stream: Permission denied in /srv/www/vhosts/domain.com/httpdocs/d5/modules/color/color.module in Zeile 252.

... 1 of those lines for each of the files in the theme.

The problem is, that sometimes the umask for the process seems to be wrong, and the created directory under files/color doesn't have any execute-permissions, which is not good when trying to put files in it.
After adding a call

chmod($path, 755);

in line 236 of color.module, I can't trigger the error anymore.

Comments

ray007’s picture

Sorry a small mistake crept in when reporting, added line must of course be

chmod($path, 0755);
ray007’s picture

Nobody else seeing this problem?

Then it's maybe something with the Linux server setup, though I have no idea what it could be ...

BioALIEN’s picture

I've had this problem also on all cPanel based hosting using 5.0. I haven't tested this for 5.1 can someone else please confirm?

ray007’s picture

just for information: our host is plesk-managed, and it happened with drupal 5 and 5.1, both with php 4.

ray007’s picture

Any chance of this going in sometime? Shouldn't hurt anybody ...

drumm’s picture

Version: 5.0 » 6.x-dev

Looks like this is still present in CVS, so moving to 6.x-dev.

I think this should use file_check_directory() to create the directory.

beginner’s picture

Status: Active » Closed (duplicate)

I think this is a duplicate of the following, which is now fixed:
http://drupal.org/node/119196