Hola @Joheso88,
This is a file permission error in your files directory. You can see from the error message that it is /u01/app/ojs/ojs-files on your server; you can also find it in the files_dir setting in the OJS config.inc.php configuration file.
First up, I can see that your files directory is not inside the web root – that’s good!
How you should configure file permissions will depend on how your server runs PHP scripts. You can check your phpinfo to see what user account on the server needs access to the contents of the files directory.
1. Find your phpinfo
If you’re not sure where to find your phpinfo, you can try one of the following:
- Use OJS.
- Log in as an administrator
- Go to
Administration
- Go to
System Information
- Go to
Extended PHP Information (at the very bottom)
- Create and view a
phpinfo script on your server. Your server’s knowledge base may have more specific instructions on how to do this. See this example.
2. Find out what user is used on your server to execute scripts.
In the phpinfo page, you’ll see this under the Environment section. For example:
This indicates that the asmecher user is used to run PHP scripts on this system.
3. Make sure the necessary user has permission to access the contents of the files directory.
Now that we know where the files directory is (/u01/app/ojs/ojs-files in the error message above), and what user is used to execute scripts on your server (asmecher in the example screenshot), we need to make sure that the user account has permission to manage the contents of the files directory.
This is more of a server administration question than an OJS-specific question, and will depend on how your server works and what access you have to it. If you’re using a commodity webhost, their knowledge base may have information about this. See this example.
On most Linux-based servers, you will just need to make sure that the user account owns the files directory and its contents:
chown -R asmecher /u01/app/ojs/ojs-files
If you don’t have permission to run this command, or your server uses SELinux security extensions, then you may need to learn a bit more about permissions on your server.
(I would also recommend configuring your server so that errors and warnings are sent to the error logs, not the browser – but that’s another topic!)
Regards,
Alec Smecher
Public Knowledge Project Team