Cannot access Nextcloud server due to folder permission issues

  • Hello all,


    I recently got my server setup with everything working perfectly. I had begun to migrate my files from Google drive to my nextcloud server. Even began setting up backups to my nextcloud server. I noticed that using the web interface was prone to timeouts when moving multiple gigs of data that took multiple hours. This prompted me to investigate smb shared folders. This would hopefully allow me to simply drag and drop files from the explorer on windows and let it run that way. But when I realized my omv users only had read access to the nextcloud shared folder I believe I made a large mistake. I began to change the permissions on all shared folders to be able to read and write from the windows file explorer on the shared folders. This fixed my issue in the file explorer and I moved all my data over to the next cloud share. But when I went to the web gui for the next cloud server to sort the data I was restricted access. The error I was given was: "Cannot write into 'apps' directory

    This can usually be fixed by giving the webserver write access to the apps directory"

    There is more to the error but I believe it is an obvious error.


    When I trouble shoot through the various errors and grant permission where it recommends I reach the final error that all of my branches end at. The error says that everyone has access to my nextcloud folders and that it will not allow me to login while this is true.


    I am a beginner in regards to servers and omv especially. I am proficient with computers and understand most high level discussions so feel free to skip some basic steps when explaining. I will scream if I don't understand and ask for clarification. I would love to reach a solution that results in my data not being lost on the drive allotted to next cloud. As it is now my only back up of a plethora of files I need. Rookie mistake I know. Thank you all for your help in advance! If you all need any output of any commands I am ready to provide that or any clarification!!

    • Offizieller Beitrag

    My personal opinion... Nextcloud is for cloud file access (ie, accessing your files while off your network). If you've got pictures, videos, documents you want to show/share.. That's what it is best for. Unless nextcloud is syncing to some other cloud service, it seems you're just using nextcloud as a local backup, which to me seems pointless unless you need cloud access to all these files. There's better tools for backing up systems to your server (rclone, syncthing, to name a few)

  • My personal opinion... Nextcloud is for cloud file access (ie, accessing your files while off your network). If you've got pictures, videos, documents you want to show/share.. That's what it is best for. Unless nextcloud is syncing to some other cloud service, it seems you're just using nextcloud as a local backup, which to me seems pointless unless you need cloud access to all these files. There's better tools for backing up systems to your server (rclone, syncthing, to name a few)

    I completely agree. What I am using and wishing to use next cloud for is exactly this. I simply wanted to dump files faster and I made the assumption that dragging and dropping through file explorer would be faster. Thus, my problem above occurred. I do not wish to, or need, the smb share on my network. I simply wanted it for convenience for my single massive file dump. Then I would remove it. But obviously I have broken it in the process and am unsure how to fix my mistake.

    • Offizieller Beitrag

    I completely agree. What I am using and wishing to use next cloud for is exactly this. I simply wanted to dump files faster and I made the assumption that dragging and dropping through file explorer would be faster. Thus, my problem above occurred. I do not wish to, or need, the smb share on my network. I simply wanted it for convenience for my single massive file dump. Then I would remove it. But obviously I have broken it in the process and am unsure how to fix my mistake.

    Gotcha... I thought you were making like full backups to Nextcloud. I've never used Nextcloud the way you attempted this... so I can't really give you much of a suggestion on this. I always use the UI and it works fine.

  • Gotcha... I thought you were making like full backups to Nextcloud. I've never used Nextcloud the way you attempted this... so I can't really give you much of a suggestion on this. I always use the UI and it works fine.

    If there is not a way to reset the permissions on nextcloud then is there a way to keep all the data I have on the drive but simply reinstall nextcloud to reset the permissions??

    • Offizieller Beitrag

    If there is not a way to reset the permissions on nextcloud then is there a way to keep all the data I have on the drive but simply reinstall nextcloud to reset the permissions??

    I'm not sure... Typically, if you move folders and files to nextcloud like you did (over smb) they don't just magically appear in the nextcloud UI. There is a command you have to run (after bashing into the container)... that will rescan the database... it's occ-scan... something. It's been mentioned here before.. maybe a search will find it.

    • Offizieller Beitrag

    If there is not a way to reset the permissions on nextcloud then is there a way to keep all the data I have on the drive but simply reinstall nextcloud to reset the permissions??

    Try taking a look at this, it says it's safe...


    https://help.nextcloud.com/t/i…ess-or-upload-files/52685



    so ... Understanding you are in uncharted territory for me as I've never had to do this, if you wanted to try that...


    SSH your server as root

    Code
    docker exec -it container_name bash   #(container name is whatever you named your nextcloud container)

    when you see the prompt change....


    Code
    occ files:scan --all

    Let it finish, and when you're back at the prompt, type exit to drop out of the bash session. If I remember reading correctly... that will scan files that are drag/dropped into the nextcloud folder, into the database ad you should see the in the nextcloud UI.


    That is worth what you paid for it.

  • Sadly, after trying these suggestions, and others I could find, I have resulted in moving my data I want out of the nextcloud folder via the command line. Then I uninstalled the nextcloud server via portainer and deleted the shared folder in omv. I thought I could just start over then do a scan after I moved the files back into the nextcloud folder, but after doing a fresh install with the same docker-compose.yml file as before I receive an Internal Server Error. I am at a loss. I am unsure where I have possibly bricked my entire nextcloud instance. I have Plex and duckdns running perfectly fine. I am unable to get Nextcloud back up and running. Thanks for your continued help and I can't wait to get her running again.

Jetzt mitmachen!

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