Closed martineyz closed 1 year ago
P: ¿No hay que mostrar el resultado de la consulta en la pagina? (Me parece que sería mucho más funcional que guardarlo en un archivo) R: Enunciado 3.5 "dejando el resultado en el archivo consulta.txt."
P: Cuando trato de escribir un archivo mediante el script php desde la web me sael este error: Warning: file_put_contents(../consulta.txt): Failed to open stream: Permission denied in /home/grupo61/Sites/consulta.php on line 48. ¿Como se podría solucionar? R: Revisando los permisos del directorio Sites para el usuario que escribe
@ypne
Le dice permiso a 'others' para escribir en Sites (incluso en el .php y .txt por si acaso)
Pero me sigue saliendo el mismo error:
The error message "failed to open stream" in PostgreSQL typically indicates a problem with accessing a file or a network resource. This could be due to various reasons such as incorrect file paths, permission issues, or network connectivity problems. Here are some steps to troubleshoot and resolve this issue:
Check File Path: Ensure that the file path you are trying to access is correct. If it's a relative path, verify that it's relative to the correct base directory.
File Permissions: Check if the PostgreSQL service has the necessary permissions to access the file. This often involves ensuring that the user running the PostgreSQL service has read (and possibly write) access to the file.
File Existence: Make sure that the file actually exists at the specified location.
Network Resources: If the resource is on a network (like a network share or a remote server), ensure that the network path is correct and that the PostgreSQL server has network access to the resource.
SELinux or AppArmor: On systems with SELinux or AppArmor, these security modules might restrict access to certain files. Adjust the policies if necessary.
PostgreSQL Logs: Check the PostgreSQL logs for more detailed error messages. These logs often provide more context about the error.
Context of the Error: Consider the operation that caused the error. If it's a custom script or an extension, ensure it's configured correctly.
File System Issues: Ensure there are no file system issues, such as corruption or full disk space, that could prevent file access.
Restart PostgreSQL: Sometimes, simply restarting the PostgreSQL service can resolve transient issues.
Check PostgreSQL Configuration: If the issue is related to a PostgreSQL configuration file, ensure that the file is correctly formatted and the settings are appropriate.
If you're still facing issues, it would be helpful to provide more specific information about the context in which this error occurs, such as the specific operation or command you are trying to execute, and any relevant configurations or scripts involved.
me da la impresion que el directorio dee tener o+x
Al final lo logré solucionar. Gracias
@ypne Para el txt está bien dajar las columnas separdas por comas o se espera otro formato?
Hola, hice una pregunta en la issue 269 sobre el item 3.5 del proyecto (https://github.com/IIC2413/Syllabus-2023-2/issues/296). Abro esta nueva issue porque ya llevo 3 días sin respuesta y estoy esperandola para poder avanzar con eso. Gracias