Android app file ownership (Obsidian) not default_user

I have installed syncthing and have succesfully synced data from my server into a folder under /home/default-user/android-storage . That data is an Obsidian vault and the data is owned by default-user (inspected by ssh-ing into the device).

Then I installed the Obsidian Android app and it can open and display the notes in the vault. However it cannot change them, and when I create a new note it is inserted it at outside of the vault.
The note created on the phone has ownership 510041.510041 instead of default_user, so I assume Obsidian runs as a different user (which is not in /etc/passwd)

I haven’t found a user with that uid or group with that gid ( 510041 , otherwise ls -l would not show the number). I also haven’t found a way to set/change the user as which Obsidian is running, which I assume is a security feature not allowing the app to access data of the default_user.

I would like to be able to edit the files in the synced folder so syncthing will also push the changes to the server. Should I try to syncthing as user with uid 510041? Where does that uid get set (and does it never change)? Or is there a better way to get this to work?

( Sailfish OS on Sony Xperia 10 III )

1 Like

There was some sort of file creation/permission issue that got fixed in, so you should probably try to update.
It is also possible that some permission groups got orphaned during some migration and needs manual intervention, as has been the case in a few instances previously.
If it is not too much work, starting over with the apps after having removed the files is probably the easiest to get right.

Thanks, but that didn’t help. I updated the OS, reinstalled the Obsidian.apk file, but it still wants to create files with uid 510041. I made sure I enabled access to the app whenever I was asked if access to data was ok.

I changed the permissions of the vault on the server ( chmod -R o+w ), and after that was synced, I could update existing notes (that came from the server). One file got emptied, probably because there were changes that could not be written before the directory permissions were synced. Fortunately I had revisions on on the server.

I guess I can solve permissions problems on the server by regularily running a chmod, but it would nice to have a solution where I don’t have to give other write permission to the directories.

Sounds like you have enough info to file a bug report. :slight_smile:

1 Like

The “odd” uid is just an artifact of the Android App Support implementation. It uses LXC containers and you can find some hints at its man page in the section UID/GID mapping.

To solve this, this FUSE filesystem can be employed to automatically map ownership. I am not sure whether it is available with your phone’s kernel package, though.

Had this same issue. I ended up moving to the Android version of syncthing but it’s not ideal and the settings page is broken so I cannot set it to autostart toghether with android appsupport. A solution to this problem to permit use of native syncthing would be greatly appreciated.

So was anyone able to successfully use syncthing with Obsidian in some way?