Docker, nextcloud errors

  • HELP!
    nextcloud is driving me crazy.
    From one day it doesn't work anymore, this error comes out:

    Code
    Internal Server Error
    
    
    The server encountered an internal error and was unable to complete your request.
    Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
    More details can be found in the server log.






    surely it is a problem of permissions, if I modify them in 777 it comes out this other error:


    Code
    Error
    
    
    The data folder can be read by other users
    
    
    Change the permissions in 0770 so that the folder is not readable by other users.



    so changing the permissions in 770 is again giving me the first error
    I can't find a way out, I feel like crying.


    P.S.
    every time I restart the NAS or restart the Nextcloud container
    the permissions of the config and data folders are reset.


    EDIT:


    these are the permissions set when I get the error "change permissions in 0770"




    Code
    drwxrwsrwx+ 10 root users     4096 dic 12  2018 appdata_ocn4zw9h4isn                                                                                                                          
    drwxrwsrwx+ 10 root users     4096 mar  3 18:58 appdata_ocrs4axdsr93                                                                                                                          
    drwxrwsrwx+  2 root users     4096 giu  6 23:12 files_external                                                                                                                                
    -rwxrwxrwx+  1 root users        0 giu  6 23:12 index.html                                                                                                                                    
    drwxrwsrwx+  7 root users     4096 mar  3 20:14 Ivan                                                                                                                                          
    -rwxrwxrwx+  1 root users     4096 feb 23 02:45 nextcloud.db                                                                                                                                  
    -rwxrwxrwx+  1 root users 17366008 lug 25 12:39 nextcloud.log                                                                                                                                 
    -rwxrwxrwx+  1 root users  1323008 feb 22 17:45 owncloud.db                                                                                                                                   
    -rwxrwxrwx+  1 root users    24647 giu  6 23:12 updater.log                                                                                                                                   
    drwxrwsrwx+  4 root users     4096 giu  6 23:12 updater-ocrs4axdsr93




    EDIT2:


    if I use the address https://xxxxxxx:444/index.php/login
    gives me this error


    Code
    Internal Server Error
    
    
    The server encountered an internal error and was unable to complete your request.
    Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
    More details can be found in the server log.




    if instead I use this address https://xxxxxxx:444/
    tell me this


    Code
    502 Bad Gateway
    nginx/1.16.0

    if this information can help me solve my problem

  • I solved it roughly, I deleted the container of Nextcloud, made a backup copy of the data folder and config, reconstructed the container and copied all the backup files in the data folder, then I copied one by one the backup folders present in the config directory and I found the folder that created problems, when I put in the www folder it gave me an error again. I hope to be of help to someone else.


    as always, forgive me my English.

  • after several tests I can now say that the problem was in the config.php file, I don't know why it didn't work, if I inserted the entire file in the config folder the error returned, so I copied and pasted the contents of the backup config.php file and saved to the new file and it worked.
    I have no idea why, I suspect the permissions of the backup file are possible?

  • another update, the problem has recurred, I was forced to change the permissions of the given folder again because I was not allowed to upload files to the cloud.
    in summary:
    1) if I add the permissions to "others" it warns me that I have to set the permissions 0770
    2) if I add the 0770 permissions it gives me a server error
    3) if I delete and recreate the container the web page works, but the smartphone app does not let me upload photos and videos because the user does not have permission to write to the folder.


    I'm going crazy

  • unbelievable
    yesterday I changed all the permissions of the folders and files one by one, the app was able to upload photos and videos to the server.
    Today I try to enter the settings from the Web Gui of Nextcloud and discover a new error , I try to restart the container of nextcloud but I get some errors (this), so I restart the server and now the container of Nextcloud is gone. Fortunately I'm not physically in the same place as the server, otherwise I would have set it on fire.

  • Ok, I definitely solved the problem, after giving back the permissions I got the new error message and I couldn't get into the settings of the Nextcloud Gui, the previews and the photos weren't loaded. The problem was that in the given directory I had three folders "appdata_(alphanumeric characters)" and in the file config.php the wrong one was set in
      'instanceid' => '(alphanumeric characters)',
    after modifying the config file with the right folder everything started to work well.
    I will miss writing in this my little daily diary, but fortunately I solved it.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!