OJS 3.0.1 Install Error, Public Files Directory not writable, but it is

Good Evening:
I am installing OJS 3.0.1 and have the following error:
Errors occurred during installation
The public files directory does not exist or is not writable.

Is anyone having this issue as well? Any solutions?

I have checked the permissions (0772, modified from 0777 I used), see that the two subdirectories have been formed (./journals and ./site), have verified the file is writable using php command is_writable(’/home/path/folder’) (used code from a similar issue out of the 2005 archives, yes 2005), see that the Pre-Installation Steps show that all are writable, and am quite stuck.

My shared server settings (godaddy hosting):
Apache 2.4.23
PHP 5.6.27
MySQL 5.5.52

If you need additional information, please advise.

Thank you!

Hi @coastalplain,

Does your server use SELinux extensions? You may have to configure those permissions too.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, @asmecher:
I have run several of the SELinux test commands through the PHP scripts:
Such as:

<?php $output = shell_exec('getenforce'); echo "
$output
"; ?>

But nothing comes up. In talking with GoDaddy technical support, they have told me that SELinux extensions are not present except on very specialized servers. Do you have other commands to invoke in order to test, or other ideas?
Thank you for your reply!

Hi all,

To double-check, are you sure you’re setting permissions on the public subdirectory in your OJS installation?

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, public is writable. I have set to 777 to verify; what should the setting be in the final installation? 772?
Thank you

Hi, @asmecher

I deleted everything to start fresh, extracted the same tar.gz, set the folders all to 777 (config.inc.php, public, cache/*, files), verified MySQL information (db, uname, pwd), and reinstalled–it worked. I do have a question regarding what the permissions should be on each folder, as I recognize 0777 is not necessarily a good setting to have open. What should the final permissions be for the following (I can’t find the explicit indication for Owner/Group/World and rwx requirements):

config.inc.php
public
cache (and subdirectories)
files (not web-accessible)

The platform explicitly allows for me to enter 0777 etc. for each file/folder, so it is fairly easy through the CPanel. I am not certain what was not set correctly or if a file was missing (sorry to future readers). Now on to setting up a journal! I’m sure additional questions will arise, but thank you for all your help here.

Cheers!

Hi @coastalplain,

Glad to hear you’re making some progress. You’ll have to consider ownership as well as numeric permissions (e.g. 777 vs 755 etc.) – and the best approach will depend on your server’s configuration. Unfortunately that means there’s no simple single answer to this question. See this FAQ entry for more information.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

a bit late, but Thank You!

Still correct:heart_eyes:

Toooooo late. But the problem is you have to set the permissions specifically for the folder. Like so…

sudo chmod -R 777 /var/www/$yourojsdir/public/

Hi all,

Note that 777 permissions are never safe to use; they might be helpful for debugging/testing but you should always use something more restrictive.

Thanks,
Alec Smecher
Public Knowledge Project Team

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.