Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Syncthing
  3. Failed to Create Folder in Syncthing Admin - Read Only File System

Failed to Create Folder in Syncthing Admin - Read Only File System

Scheduled Pinned Locked Moved Solved Syncthing
22 Posts 3 Posters 5.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      S Offline
      saint
      wrote on last edited by
      #1

      Hi there,

      I am trying to setup syncthing between my server and laptop. However, when I try and create or use an existing directory under /mnt/, /media/, /srv/, etc. I keep getting the same read-only error from the syncthing admin panel.

      syncthing-read-only-error-notice.png

      syncthing-folder-view.png

      I have also tried to login through console as root, and created the directories in CLI, which was successful. Below is an example.

      cloudron-vol-added.png

      But, when I try to add the whatever directory created in CLI in syncthing admin panel, it gives me the same error.

      Last, I have also tried to chmod -R 777 the directory to see if it was an access issue between accounts, but still running into the same issue.

      I am trying to create this "volume" so that I can sync things in from my Laptop, but use Nextcloud's "External Storage" plugin to have it show up in Nextcloud.

      Any tutorials or videos that can help explain what could be going on?

      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        For a start the volume would probably be mounted in /media/<volumename> instead of /mnt within the app. You can check this with using the webterminal into the app. Then you have to give other users write access for that folder, so syncthing, which runs as cloudron user has access to create the folder and write into it. Then it worked in my testing here.

        S 1 Reply Last reply
        0
        • nebulonN nebulon marked this topic as a question on
        • nebulonN nebulon

          For a start the volume would probably be mounted in /media/<volumename> instead of /mnt within the app. You can check this with using the webterminal into the app. Then you have to give other users write access for that folder, so syncthing, which runs as cloudron user has access to create the folder and write into it. Then it worked in my testing here.

          S Offline
          S Offline
          saint
          wrote on last edited by
          #3

          @nebulon Thanks for the reply, so I've gone ahead and tried your suggestion. So far, I haven't had success. Can you see if there's anything I am doing incorrectly?

          I've added the directory to under /media/.

          Screen Shot 2022-09-17 at 1.17.25 PM.png

          And originally, the /sync/ and it's sub-directories were all owned by root.

          From what I understand, cloudron runs as user 1000, so I tried:

          chown 1000:1000 /sync/
          chown 1000:1000 /sync/server_io_mba
          

          Then tried:

          chmod -R 774 ./sync
          

          But am still getting the same error when trying to resume sync in Syncthing.

          As a test to see if could be a permission issue, then tried:

          chmod -R 777 ./sync
          

          But that didn't change anything.

          Is there something I may have missed?

          Thank you!

          S 1 Reply Last reply
          0
          • S saint

            @nebulon Thanks for the reply, so I've gone ahead and tried your suggestion. So far, I haven't had success. Can you see if there's anything I am doing incorrectly?

            I've added the directory to under /media/.

            Screen Shot 2022-09-17 at 1.17.25 PM.png

            And originally, the /sync/ and it's sub-directories were all owned by root.

            From what I understand, cloudron runs as user 1000, so I tried:

            chown 1000:1000 /sync/
            chown 1000:1000 /sync/server_io_mba
            

            Then tried:

            chmod -R 774 ./sync
            

            But am still getting the same error when trying to resume sync in Syncthing.

            As a test to see if could be a permission issue, then tried:

            chmod -R 777 ./sync
            

            But that didn't change anything.

            Is there something I may have missed?

            Thank you!

            S Offline
            S Offline
            saint
            wrote on last edited by
            #4

            Hi guys, following up on this question.

            nebulonN 1 Reply Last reply
            0
            • S saint

              Hi guys, following up on this question.

              nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #5

              @saint this seems pretty much what I did and got it working there. Do you know why in your screenshot the mountpoint has the red indicator that it is down?

              S 1 Reply Last reply
              0
              • nebulonN nebulon

                @saint this seems pretty much what I did and got it working there. Do you know why in your screenshot the mountpoint has the red indicator that it is down?

                S Offline
                S Offline
                saint
                wrote on last edited by
                #6

                @nebulon For some reason it says it's not mounted.

                Screen Shot 2022-09-22 at 10.50.32 PM.png

                But, I am able to upload files to that Mount Point?

                Screen Shot 2022-09-22 at 11.10.16 PM.png

                At this point, does it make sense to do a private login and see what may be causing this situation? Thank you.

                girishG 1 Reply Last reply
                0
                • S saint

                  @nebulon For some reason it says it's not mounted.

                  Screen Shot 2022-09-22 at 10.50.32 PM.png

                  But, I am able to upload files to that Mount Point?

                  Screen Shot 2022-09-22 at 11.10.16 PM.png

                  At this point, does it make sense to do a private login and see what may be causing this situation? Thank you.

                  girishG Do not disturb
                  girishG Do not disturb
                  girish
                  Staff
                  wrote on last edited by girish
                  #7

                  @saint Since this is mountpoint type, you have to SSH and check why it's not mounted using journactl and mount commands. I guess you set this mountpoint manually ? Check the output of mountpoint /media/sync/server_io_mba

                  S 1 Reply Last reply
                  0
                  • girishG girish

                    @saint Since this is mountpoint type, you have to SSH and check why it's not mounted using journactl and mount commands. I guess you set this mountpoint manually ? Check the output of mountpoint /media/sync/server_io_mba

                    S Offline
                    S Offline
                    saint
                    wrote on last edited by
                    #8

                    @girish So at this point, I feel like I'm grasping at straws.

                    I've deleted the directories, remade them and changed the mount type to "filesystem"

                    Screen Shot 2022-09-24 at 11.07.04 PM.png

                    Now it says it's mounted.

                    But when I do, it tells me it is not mounted.

                    noVNC 2022-09-24 at 11.08.58 PM.jpg

                    I feel like I'm going back-and-forth, and not sure how to move past this and get to what I actually need to do (which is setup syncthing so I can get Sketch files linked to the server.)

                    girishG 1 Reply Last reply
                    0
                    • S saint

                      @girish So at this point, I feel like I'm grasping at straws.

                      I've deleted the directories, remade them and changed the mount type to "filesystem"

                      Screen Shot 2022-09-24 at 11.07.04 PM.png

                      Now it says it's mounted.

                      But when I do, it tells me it is not mounted.

                      noVNC 2022-09-24 at 11.08.58 PM.jpg

                      I feel like I'm going back-and-forth, and not sure how to move past this and get to what I actually need to do (which is setup syncthing so I can get Sketch files linked to the server.)

                      girishG Do not disturb
                      girishG Do not disturb
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      @saint Did you figure this one out?

                      To help debug, let's do this step by step:

                      • Can you tell me what is /media/sync ? Is this really an external disk or external mount ?

                      • You have two choices on how to mount this on the server: Either use the volumes UI to mount the external file system OR mount this by ssh'ing into the server yourself and select the mountpoint type. In the former case, Cloudron will generate the needed systemd mount config files for automatic mounting on server reboot etc. In the latter case, you can consider it totally 'unmanaged' and you have to manage it. Do not choose the 'filesystem' type unless it's really the same disk (internally, what this does is to skip many of the mountpoint tests and thus will make debugging harder).

                      • Once you do the above, we have to get the green icon as the status. If we don't get this, we have to figure out why. I can help further, if you can explain your setup a bit more.

                      S 1 Reply Last reply
                      0
                      • nebulonN Offline
                        nebulonN Offline
                        nebulon
                        Staff
                        wrote on last edited by
                        #10

                        Lets pick this up again now here instead of the private email support channel, so others can benefit from the information as well.

                        Just to be clear, Cloudron has the host filesystem and then runs apps in containers, which are isolated from the host, but get specific folders (the /app/data as well as volumes) mounted into the container. The permissions of those things will look different from the host system compared to what the app sees. This is to be expected. This is because of how unix user IDs are matched with actual usernames.

                        In your case what you need to do is, to open the webterminal into the synthing app instance and there perform the chown of the folder in the volume which needs to have changed permissions. The user who should own those directories is called cloudron as that is the user with which syncthing runs.

                        1 Reply Last reply
                        0
                        • girishG girish

                          @saint Did you figure this one out?

                          To help debug, let's do this step by step:

                          • Can you tell me what is /media/sync ? Is this really an external disk or external mount ?

                          • You have two choices on how to mount this on the server: Either use the volumes UI to mount the external file system OR mount this by ssh'ing into the server yourself and select the mountpoint type. In the former case, Cloudron will generate the needed systemd mount config files for automatic mounting on server reboot etc. In the latter case, you can consider it totally 'unmanaged' and you have to manage it. Do not choose the 'filesystem' type unless it's really the same disk (internally, what this does is to skip many of the mountpoint tests and thus will make debugging harder).

                          • Once you do the above, we have to get the green icon as the status. If we don't get this, we have to figure out why. I can help further, if you can explain your setup a bit more.

                          S Offline
                          S Offline
                          saint
                          wrote on last edited by
                          #11

                          @girish Thanks for your thoughts.

                          Can you tell me what is /media/sync ? Is this really an external disk or external mount?

                          Screen Shot 2022-10-17 at 1.43.17 AM.png

                          From what I can see, both of these are green and my understanding is that it is mounted.

                          Do not choose the 'filesystem' type unless it's really the same disk (internally, what this does is to skip many of the mountpoint tests and thus will make debugging harder

                          I see, is there a recommended approach to selecting the correct Mount Type?

                          @nebulon - Please see below.

                          The user who should own those directories is called cloudron as that is the user with which syncthing runs.

                          I chown'd the user to '1000', as from what I understand that is the user for cloudron. Does this look about right to you?

                          Screen Shot 2022-10-17 at 1.55.01 AM.png

                          Much appreciate it guys.

                          S girishG 2 Replies Last reply
                          0
                          • S saint

                            @girish Thanks for your thoughts.

                            Can you tell me what is /media/sync ? Is this really an external disk or external mount?

                            Screen Shot 2022-10-17 at 1.43.17 AM.png

                            From what I can see, both of these are green and my understanding is that it is mounted.

                            Do not choose the 'filesystem' type unless it's really the same disk (internally, what this does is to skip many of the mountpoint tests and thus will make debugging harder

                            I see, is there a recommended approach to selecting the correct Mount Type?

                            @nebulon - Please see below.

                            The user who should own those directories is called cloudron as that is the user with which syncthing runs.

                            I chown'd the user to '1000', as from what I understand that is the user for cloudron. Does this look about right to you?

                            Screen Shot 2022-10-17 at 1.55.01 AM.png

                            Much appreciate it guys.

                            S Offline
                            S Offline
                            saint
                            wrote on last edited by
                            #12

                            Hi @nebulon @girish - Please let me know if the above was helpful, or if I could help provide any additional context.

                            girishG 1 Reply Last reply
                            0
                            • S saint

                              @girish Thanks for your thoughts.

                              Can you tell me what is /media/sync ? Is this really an external disk or external mount?

                              Screen Shot 2022-10-17 at 1.43.17 AM.png

                              From what I can see, both of these are green and my understanding is that it is mounted.

                              Do not choose the 'filesystem' type unless it's really the same disk (internally, what this does is to skip many of the mountpoint tests and thus will make debugging harder

                              I see, is there a recommended approach to selecting the correct Mount Type?

                              @nebulon - Please see below.

                              The user who should own those directories is called cloudron as that is the user with which syncthing runs.

                              I chown'd the user to '1000', as from what I understand that is the user for cloudron. Does this look about right to you?

                              Screen Shot 2022-10-17 at 1.55.01 AM.png

                              Much appreciate it guys.

                              girishG Do not disturb
                              girishG Do not disturb
                              girish
                              Staff
                              wrote on last edited by
                              #13

                              @saint said in Failed to Create Folder in Syncthing Admin - Read Only File System:

                              I see, is there a recommended approach to selecting the correct Mount Type?

                              The filesystem was used primarily for migration purposes (from old Cloudron versions). Are you able to mount them with the correct type? If so, I think we need to start there to figure why it's not mounting.

                              Also, I wanted to quickly check why you are using volumes here. Is this because you want to share the data with another app ? If you just want to move the data to another location you can use https://docs.cloudron.io/apps/#data-directory

                              1 Reply Last reply
                              0
                              • S saint

                                Hi @nebulon @girish - Please let me know if the above was helpful, or if I could help provide any additional context.

                                girishG Do not disturb
                                girishG Do not disturb
                                girish
                                Staff
                                wrote on last edited by girish
                                #14

                                @saint OK, I went back and re-read your initial post. Your intention is that you will sync using Syncthing and have the files available via the External volumes plugin of nextcloud. This is the reason you want to create a filesystem volume.

                                I think I managed to hit some of the issues you faced but I have sort of got it working. I tried to basically keep things like what you posted in the screenshots.

                                Here's what I did:

                                • First, create a directory /mnt/sync on the server
                                • Important: chmod 777 /mnt/sync. This is required so the containers can write to this directory.
                                • Add the Cloudron volume named Sync as Filesystem (do not use Filesystem (mountpoint) ). When you do this, the icon should be green. After all, there is nothing to mount.
                                • Now, add the volume in Syncthing. Add folder inside Syncthing. You should be able to sync now.

                                Next step, nextcloud:

                                • Add volume to nextcloud.
                                • Enable External plugin. Add /media/Sync in Configuration column to add folder.
                                • I can see the files now.

                                What's missing right now is that I cannot edit files via nextcloud because of permissions issues but can view them. Do you want them to be modifiable in nextcloud ? If so, we have to dig deeper into permissions stuff.

                                1 Reply Last reply
                                2
                                • girishG Do not disturb
                                  girishG Do not disturb
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #15

                                  @saint I wrote a doc section that will also help you make it writable across apps - https://docs.cloudron.io/volumes/#sharing

                                  S 1 Reply Last reply
                                  2
                                  • girishG girish

                                    @saint I wrote a doc section that will also help you make it writable across apps - https://docs.cloudron.io/volumes/#sharing

                                    S Offline
                                    S Offline
                                    saint
                                    wrote on last edited by
                                    #16

                                    @girish Thanks for the reply, and the documentation.

                                    I feel like I'm running in circles. Following the instructions above, and also the docs, I still keep getting the below:

                                    Screen Shot 2022-11-08 at 12.19.32 AM.png

                                    The directories are all chmod' to 777. I've changed it to "media" as the group owner. But it keep showing that same error.

                                    girishG 1 Reply Last reply
                                    0
                                    • S saint

                                      @girish Thanks for the reply, and the documentation.

                                      I feel like I'm running in circles. Following the instructions above, and also the docs, I still keep getting the below:

                                      Screen Shot 2022-11-08 at 12.19.32 AM.png

                                      The directories are all chmod' to 777. I've changed it to "media" as the group owner. But it keep showing that same error.

                                      girishG Do not disturb
                                      girishG Do not disturb
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #17

                                      @saint I think syncthing is saying that the mount is read only. Can you check if the volume is mounted as writable in syncthing ? It's a checkbox in the mount ui. (Now that I look at it , maybe we should make it like a drop down to make it clearer).

                                      S 1 Reply Last reply
                                      0
                                      • girishG girish

                                        @saint I think syncthing is saying that the mount is read only. Can you check if the volume is mounted as writable in syncthing ? It's a checkbox in the mount ui. (Now that I look at it , maybe we should make it like a drop down to make it clearer).

                                        S Offline
                                        S Offline
                                        saint
                                        wrote on last edited by
                                        #18

                                        @girish Am I looking at the right place? I'm in the volumes settings area, but don't see any checkbox in the mount UI?

                                        Screen Shot 2022-11-08 at 8.32.42 PM.png

                                        girishG 1 Reply Last reply
                                        0
                                        • S saint

                                          @girish Am I looking at the right place? I'm in the volumes settings area, but don't see any checkbox in the mount UI?

                                          Screen Shot 2022-11-08 at 8.32.42 PM.png

                                          girishG Do not disturb
                                          girishG Do not disturb
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #19

                                          @saint in the UI where you actually mount the volume into the app - https://docs.cloudron.io/apps/#mounts

                                          S 1 Reply Last reply
                                          0
                                          • girishG girish

                                            @saint in the UI where you actually mount the volume into the app - https://docs.cloudron.io/apps/#mounts

                                            S Offline
                                            S Offline
                                            saint
                                            wrote on last edited by
                                            #20

                                            @girish Ahh, got it. Okay, this is what I see in the Nextcloud storage mount UI.

                                            Yep, I think you're right. It is "read-only"

                                            Screen Shot 2022-11-09 at 11.27.38 PM.png

                                            This is what I see when I added the Volume that's tied to /mnt/sync.

                                            To test, I unchecked it, hit save, then tried to delete & re-add the sync directory in Syncthing.

                                            But, still encountering the same error.

                                            Screen Shot 2022-11-09 at 11.33.55 PM.png

                                            girishG 1 Reply Last reply
                                            0
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes


                                              • Login

                                              • Don't have an account? Register

                                              • Login or register to search.
                                              • First post
                                                Last post
                                              0
                                              • Categories
                                              • Recent
                                              • Tags
                                              • Popular
                                              • Bookmarks
                                              • Search