Author Topic: [1.5.3] random folder creation errors  (Read 2564 times)

Nuno Zimas

  • Full Member
  • ***
  • Posts: 127
    • View Profile
[1.5.3] random folder creation errors
« on: October 21, 2009, 02:19:16 pm »
Every now and then, with no obvious pattern, i am gettng errors like the following, mostly in the mail module:

Error:

Failed to create folder '/path/to/opengoo/upload/a97/22d/240'

The uploads folder is properly owned by the user of the webserver process (www-data in debian like systems).
As a matter of fact, i am able to upload docs.

Thanks,
Nuno.
OS: GNU/Linux (PCLinuxOS) | Browser: Firefox 3.6.x and Chromium 5.0.x | FengOffice 1.7 RC

karlstatt

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: [1.5.3] random folder creation errors
« Reply #1 on: December 04, 2009, 07:30:22 am »
I have exactly the same error and others in the german group. Sometimes it works, sometimes not. The rights of the folders are set correct. log.php says:

ERROR: Error: mkdir(): Permission denied in '/srv/www/vhosts/mydomain/subdomains/open/httpdocs/environment/functions/files.php' on line 232 (error Code: 2)

System is OpenSuse 11, PHP 5.2.9, MySQL 5.0.51, OG 1.6 beta 2

hrikken

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: [1.5.3] random folder creation errors
« Reply #2 on: December 05, 2009, 10:44:20 am »
Same problem with 1.6. Ubuntu server 9.10

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: [1.5.3] random folder creation errors
« Reply #3 on: December 09, 2009, 11:13:46 am »
The problem may occur if you run the cron.php with another user than the webserver's (www-data or apache). In this case, some folders in the upload directory are owned by that user and the webserver user can't create subfolders there.

If you are running the cron.php with another user change that (you can use the sudo command to run as a different user, or you can use the wget command to access the cron.php as if being accessed by a browser). Also do a chown -R www-data:www-data path/to/upload.

karlstatt

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: [1.5.3] random folder creation errors
« Reply #4 on: December 11, 2009, 11:09:54 am »
ignacio, thx for the answer.

That was not the solution for me because the cronjob is already running with wget.

My upload folder has had the owner 'web2' and the group 'www'. I have changed the folder and all subfolders to the apache user (wwwrun and www) and set the rights to 755. That solved my problem.