Failed to Create Folder in Syncthing Admin - Read Only File System
-
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.
I have also tried to login through console as root, and created the directories in CLI, which was successful. Below is an example.
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?
-
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 ascloudron
user has access to create the folder and write into it. Then it worked in my testing here. -
-
@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/.
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!
-
@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"
Now it says it's mounted.
But when I do, it tells me it is not mounted.
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.)
-
@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.
-
-
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. -
@girish Thanks for your thoughts.
Can you tell me what is /media/sync ? Is this really an external disk or external mount?
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?
Much appreciate it guys.
-
@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
-
@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
asFilesystem
(do not useFilesystem (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.
- First, create a directory
-
@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:
The directories are all chmod' to 777. I've changed it to "media" as the group owner. But it keep showing that same error.
-
@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).
-
@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"
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.