Shares disappearing after reboot
silentdragon95 opened this issue · 2 comments
Hi,
firstly, thank you for this awesome tool, there really doesn't seem to be anything else quite like it!
I have however found one problem, which may just be caused by my setup but maybe someone here has ideas on how to fix it. I have Sharry installed in a Ubuntu Server VM under TrueNAS Scale. It runs as a service and does start automatically on boot, so that bit works. The files are stored in the filesystem, in a mounted SMB share (of the TrueNAS host system). However, it seems that it "forgets" all shares that have been created after a reboot. I can log in as the user Sharry is running as and access the SMB share just fine and I can even see the folders for the shares with their contents still being there, but Sharry apparently doesn't recognize them. Mind you that until I reboot the VM, everything works as expected and users are able to access and download my shares.
I suppose I could go the easy route of having everything stored in the database (assuming that would fix the issue), but since I intend on sharing large files I would really prefer to be able to use a filesystem path pointing to a SMB share.
Any ideas on what the problem might be? Thanks.
Hi @silentdragon95 thank you! I think this may be caused by not configuring the database. The default config uses a H2 database based on a file in /tmp
. Many systems clear that on boot and so all accounts and shares etc are gone.
For sharing large files, you can still use the database if you want as it also works for this quite well. If possible/sensible for your setup, I'd recommend to use postgres. You need the database for many other things like account data etc, it can also store the files, but using the file system works as well.
Ah yes you're right, that was the issue! For now I have simply changed the H2 database location to a more permanent directory, but I'll look into using a separate postgres database. Thank you!