OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Impossible to upload files but folders are writable

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.

Impossible to upload files but folders are writable

Postby Ajakss » Sun Sep 08, 2013 9:18 am

Dear,

unfortunately, in 2.3.7 version OJS I cannot upload files when I try to submit articles or try to upload files in galleys section. Folders public, cache or files are writable but the uploading every time is failed. I do not get any error messages when I do it. How can fix it? Many thanks in advance for your help.

Regards,

Adam
Ajakss
 
Posts: 55
Joined: Fri Jun 08, 2012 11:16 am

Re: Impossible to upload files but folders are writable

Postby asmecher » Sun Sep 08, 2013 9:46 am

Hi Adam,

You might try debugging with PHP's is_writable function directly. Does your server use selinux?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8570
Joined: Wed Aug 10, 2005 12:56 pm

Re: Impossible to upload files but folders are writable

Postby Ajakss » Sun Sep 08, 2013 11:10 am

Hi Alec,

I ask my admin if server use selinux. The only message I get is below. Perhaps they are useful. Thanks for your reply.

Kind regards,

Adam

ojs2 has produced an error Message: WARNING: chmod() has been disabled for security reasons In file: .../ojs/lib/pkp/classes/file/FileManager.inc.php At line: 504 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(2, "chmod() has been disabled for security reasons", ".../ojs/lib/pkp/classes/file/FileManager.inc.php", 504, Array(3)) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 504 Function: chmod(".../ojs/files/journals/1/articles/69", 493) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 292 Function: FileManager->setMode(".../ojs/files/journals/1/articles/69", 511) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 338 Function: FileManager->mkdir(".../ojs/files/journals/1/articles/69", Null) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 337 Function: FileManager->mkdirtree(".../ojs/files/journals/1/articles/69", Null) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 337 Function: FileManager->mkdirtree(".../ojs/files/journals/1/articles/69/submission", Null) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 109 Function: FileManager->mkdirtree(".../ojs/files/journals/1/articles/69/submission/original") File: .../ojs/classes/file/ArticleFileManager.inc.php line 517 Function: FileManager->uploadFile("submissionFile", ".../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc") File: .../ojs/classes/file/ArticleFileManager.inc.php line 73 Function: ArticleFileManager->handleUpload("submissionFile", "SM", Null, True) File: .../ojs/classes/author/form/submit/AuthorSubmitStep2Form.inc.php line 79 Function: ArticleFileManager->uploadSubmissionFile("submissionFile", Null, True) File: .../ojs/pages/author/SubmitHandler.inc.php line 82 Function: AuthorSubmitStep2Form->uploadSubmissionFile("submissionFile") File: (unknown) line (unknown) Function: SubmitHandler->saveSubmit(Array(1), Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(1), Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False) File: .../ojs/lib/pkp/classes/core/Dispatcher.inc.php line 129 Function: PKPPageRouter->route(Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPApplication.inc.php line 180 Function: Dispatcher->dispatch(Object(Request)) File: .../ojs/index.php line 65 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.4.4-14+deb7u2 Apache Version: N/A DB Driver: mysql DB server version: 5.5.31-0+wheezy1-log
ojs2 has produced an error Message: WARNING: move_uploaded_file(.../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc): failed to open stream: No such file or directory In file: .../ojs/lib/pkp/classes/file/FileManager.inc.php At line: 112 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(2, "move_uploaded_file(.../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc): failed to open stream: No such file or directory", ".../ojs/lib/pkp/classes/file/FileManager.inc.php", 112, Array(3)) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 112 Function: move_uploaded_file("/tmp/www/plain-infotezy/upload/phpbuxe3x", ".../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc") File: .../ojs/classes/file/ArticleFileManager.inc.php line 517 Function: FileManager->uploadFile("submissionFile", ".../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc") File: .../ojs/classes/file/ArticleFileManager.inc.php line 73 Function: ArticleFileManager->handleUpload("submissionFile", "SM", Null, True) File: .../ojs/classes/author/form/submit/AuthorSubmitStep2Form.inc.php line 79 Function: ArticleFileManager->uploadSubmissionFile("submissionFile", Null, True) File: .../ojs/pages/author/SubmitHandler.inc.php line 82 Function: AuthorSubmitStep2Form->uploadSubmissionFile("submissionFile") File: (unknown) line (unknown) Function: SubmitHandler->saveSubmit(Array(1), Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(1), Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False) File: .../ojs/lib/pkp/classes/core/Dispatcher.inc.php line 129 Function: PKPPageRouter->route(Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPApplication.inc.php line 180 Function: Dispatcher->dispatch(Object(Request)) File: .../ojs/index.php line 65 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.4.4-14+deb7u2 Apache Version: N/A DB Driver: mysql DB server version: 5.5.31-0+wheezy1-log
ojs2 has produced an error Message: WARNING: move_uploaded_file(): Unable to move '/tmp/www/plain-infotezy/upload/phpbuxe3x' to '.../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc' In file: .../ojs/lib/pkp/classes/file/FileManager.inc.php At line: 112 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(2, "move_uploaded_file(): Unable to move '/tmp/www/plain-infotezy/upload/phpbuxe3x' to '.../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc'", ".../ojs/lib/pkp/classes/file/FileManager.inc.php", 112, Array(3)) File: .../ojs/lib/pkp/classes/file/FileManager.inc.php line 112 Function: move_uploaded_file("/tmp/www/plain-infotezy/upload/phpbuxe3x", ".../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc") File: .../ojs/classes/file/ArticleFileManager.inc.php line 517 Function: FileManager->uploadFile("submissionFile", ".../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc") File: .../ojs/classes/file/ArticleFileManager.inc.php line 73 Function: ArticleFileManager->handleUpload("submissionFile", "SM", Null, True) File: .../ojs/classes/author/form/submit/AuthorSubmitStep2Form.inc.php line 79 Function: ArticleFileManager->uploadSubmissionFile("submissionFile", Null, True) File: .../ojs/pages/author/SubmitHandler.inc.php line 82 Function: AuthorSubmitStep2Form->uploadSubmissionFile("submissionFile") File: (unknown) line (unknown) Function: SubmitHandler->saveSubmit(Array(1), Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(1), Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False) File: .../ojs/lib/pkp/classes/core/Dispatcher.inc.php line 129 Function: PKPPageRouter->route(Object(Request)) File: .../ojs/lib/pkp/classes/core/PKPApplication.inc.php line 180 Function: Dispatcher->dispatch(Object(Request)) File: .../ojs/index.php line 65 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.4.4-14+deb7u2 Apache Version: N/A DB Driver: mysql DB server version: 5.5.31-0+wheezy1-log
Ajakss
 
Posts: 55
Joined: Fri Jun 08, 2012 11:16 am

Re: Impossible to upload files but folders are writable

Postby Ajakss » Tue Sep 10, 2013 2:42 am

Hi Alec,

no, my server does not use selinux.

Regards,

Adam
Ajakss
 
Posts: 55
Joined: Fri Jun 08, 2012 11:16 am

Re: Impossible to upload files but folders are writable

Postby JasonNugent » Tue Sep 10, 2013 5:49 am

Hi Adam,

The error message you posted is informative:

Message: WARNING: chmod() has been disabled for security reasons


And then further down:

Message: WARNING: move_uploaded_file(): Unable to move '/tmp/www/plain-infotezy/upload/phpbuxe3x' to '.../ojs/files/journals/1/articles/69/submission/original/69-437-1-SM.doc'


So, there seems to be a PHP setting on your server that is preventing OJS from creating directories with the proper permissions.

Regards
Jason
JasonNugent
Site Admin
 
Posts: 871
Joined: Tue Jan 10, 2006 6:20 am

Re: Impossible to upload files but folders are writable

Postby Ajakss » Tue Sep 10, 2013 6:15 am

Hi Jason,

many thanks for your reply.

Kind regards,

Adam
Ajakss
 
Posts: 55
Joined: Fri Jun 08, 2012 11:16 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests