Installation Error - Permissions | Error en instalación de OJS - Permisos

Cordial saludo comunidad PKP

Hoy paso por aquí con el objetivo de buscar ayuda que me permita corregir los siguientes errores que tengo luego de instalar OJS (Ver adjunto). Espero puedan darme una mano que permita contar el OJS al 100%. Por favor orientación detallada de como puedo proceder. Gracias

Captura de pantalla 2025-08-11 212848

Captura de pantalla 2025-0

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.
    1. Log in as an administrator
    2. Go to Administration
    3. Go to System Information
    4. 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

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

Cordial saludo.

Hoy paso por aquí para contarles que sigo sin poder solucionar los errores que allí aparecen sobre mi OJS luego de haber seguido las orientaciones dadas por ustedes. Junto al administrador del servidor se hicieron los siguientes ajustes:

root@srv-adviser ojs]# pwd
/u01/app/ojs

[root@srv-adviser ojs]# ls -l
total 0
drwsrws—+ 6 root root 77 Jul 30 22:54 ojs-files

[root@XXXXXX ojs]# getfacl ojs-files/

file: ojs-files/

owner: root

group: root

flags: ss-

user::rwx
user:apache:rwx
group::r-x
group:apache:rwx
mask::rwx
other::—
default:user::rwx
default:user:apache:rwx
default:group::r-x
default:group:apache:rwx
default:mask::rwx
default:other::r-x

Sobre esto, no se logró resolver el problema. Quedo atento a sus orientaciones.

Hola @Joheso88,

Effectively PHP just needs to be able to write in that directory, and can’t. Unfortunately we can’t give specific instructions on how to resolve this, as every server is a little different, and it’s more of a server admin task than an OJS specific issue. If you’re stuck, I suggest creating a simple test script that removes OJS from the equation entirely – something like:

<?php
ini_set('display_errors', 1); error_reporting(E_ALL);
mkdir('/u01/app/ojs/ojs-files/usageStats');

This will probably generate more of the same error messages you noted above. You’ll need to work on the permissions until PHP can create the directory. (Once it does, you’ll get a different message when you re-run the script because the directory will already exist.)

Regards,
Alec Smecher
Public Knowledge Project Team

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