OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



SAFE MODE uid mkdir problem with vesion 2.11

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

SAFE MODE uid mkdir problem with vesion 2.11

Postby pashton » Sun Jul 23, 2006 5:49 am

Hi,

I have just updated my system to 2.11 and most things have gone to plan except that I am getting an error whan I try to upload papers in the submission process. I have pasted the error below. Now I know it looks like a simple server permissions error but it was working perfelectly well before the upgrade. Any suggestions welcomed.

BTW I have been on to the host and they say that:
"When ever you create any folder through your script . The ownership of that folder is changing to nobody, but it should be of your name cosmosan"

Regards

Paul

Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 32086 is not allowed to access /home/cosmosan/public_html/files/journals/1/articles/77 owned by uid 99 in /home/cosmosan/public_html/classes/file/FileManager.inc.php on line 234

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 32086 is not allowed to access /home/cosmosan/public_html/files/journals/1/articles/77 owned by uid 99 in /home/cosmosan/public_html/classes/file/FileManager.inc.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at /home/cosmosan/public_html/classes/file/FileManager.inc.php:234) in /home/cosmosan/public_html/classes/template/TemplateManager.inc.php on line 187
pashton
 
Posts: 38
Joined: Fri Dec 17, 2004 5:51 pm

Postby asmecher » Sun Jul 23, 2006 6:56 pm

Hi pashton,

There may be a solution at http://ca3.php.net/manual/en/features.safe-mode.php#55581, depending on your host's server configuration -- you'll probably have to ask them if they can do this -- but it's possible that you won't be able to get around this restriction. In my opinion this is a "broken" PHP configuration -- any time PHP makes a directory, the permissions are set so that the directory cannot be used. OJS requires the use of different directories to organize what can easily become several thousands of files.

The sections of OJS that use the mkdir command are limited; here is a list for the current release:
  • classes/admin/form/JournalSiteSettingsForm.inc.php
  • classes/file/ArticleFileManager.inc.php
  • classes/file/FileManager.inc.php
  • classes/file/TemporaryFileManager.inc.php
  • classes/install/Install.inc.php
  • lib/adodb/adodb.inc.php
  • lib/smarty/internals/core.create_dir_structure.php
  • pages/manager/FilesHandler.inc.php
If your host has a work-around that can be implemented in PHP, it would be easy to add to OJS.

Hopefully that helps...

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8597
Joined: Wed Aug 10, 2005 12:56 pm

server or my upgrade error?

Postby pashton » Sun Jul 23, 2006 7:09 pm

Thanks for the response.

It seemed to work fine before updating to 2.11 (from 2.1). Your post seems to suggest that this is a coincidence, and ‘not’ a problem with my upgrade process but rather something wrong with the server. Is this the case?

Regards

paul
pashton
 
Posts: 38
Joined: Fri Dec 17, 2004 5:51 pm

Postby asmecher » Sun Jul 23, 2006 10:38 pm

Hi Paul,

Could you check with your host whether or not they've changed server configurations? OJS 2.1.1 doesn't substantially differ from OJS 2.1.0 in how it handles files. If you used the command-line upgrade process (i.e. php tools/upgrade.php upgrade), it's possible that file permissions got changed, but not likely; I generally correct this by running chmod and chgrp with the -R options. If you used the web-based upgrade process, no file permissions should have changed.

FYI, there's another discussion of the safe mode restriction at http://pkp.sfu.ca/support/forum/viewtopic.php?t=910; this may shed some light on the issue. In particular, note the discussion on the safe_mode_gid option. You might consider contacting that user to see if they found a workable solution.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8597
Joined: Wed Aug 10, 2005 12:56 pm

It works!

Postby pashton » Sun Jul 23, 2006 10:43 pm

Thanks Alec,

I have it going! I used your post as leverage with my host and they eventually fixed it.

Regards

Paul
pashton
 
Posts: 38
Joined: Fri Dec 17, 2004 5:51 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests