I had not used the Sharing app so far and I am trying to use it now. The guide says:
Only admins can create, edit or remove shares. They’ll find the Sharing app in the Apps section of FreedomBox web interface. Sharing app is an easy to use web application with an evident interface.
I actually don’t find evident how to:
choose the share path
upload documents there
From what I understand:
the share path is the absolute path, as visible from a shell, of a directory
the sharing app provides no mechanism to add files in that directory
I found two messages from @fefekrzr suggesting to either
use SFTP to upload files to the directory
share a directory inside a samba share
I found out that samba shares are in /var/lib/freedombox/shares, and sharing a subdirectory of /var/lib/freedombox/shares/group_share or /var/lib/freedombox/shares/homes/<username> works.
With regards to SFTP: if I understand correctly, this requires ssh access, which looks a little dangerous to me, and when doing SFTP, users can access any folder of the file system hierarchy, which also looks dangerous. Or is there a way via plinth to set some restrictions?
Is there any other practical method besides using a subdirectory of a samba share?
Is it ok to suggest that explicitly in the documentation?
I apologize as I don’t have the exact source at hand, but I’ve gleaned a lot from various posts in this forum, which helped me with a similar query. Unfortunately, I can’t locate the specific post right now. In my setup, I aimed to create a folder accessible to multiple services on my Pioneer FreedomBox. I remember reading that many services can read and write to the FreedomBox folder.
I connected a 1TB external HDD to my Pioneer FreedomBox for file storage, with my Samba shares located at /media/root/EXT_HDD/FreedomBox/shares. Inside this shares folder , I also created a sharing folder specifically for the Sharing app. Initially, I considered a setup where Syncthing, Samba, Sharing, and possibly MiniDLNA would work together in the same set of subdirectories, but eventually, I separated them as their usage didn’t overlap much in my case.
For uploads, I primarily use Samba, but occasionally resort to SFTP. While SFTP has its risks, I limit server access to my home network or VPN and restrict SSH access to myself as the admin. This setup mainly serves my personal and family needs. For instance, I have a dedicated Samba share for my wife to access files privately, without making them available to other network users. I sometimes drop files to her share using SFTP when I need to share a private document with her. I could probably improve this workflow, but it doesn’t get much use anyways.
My usage might differ from yours since it’s predominantly personal. If I were hosting services for a broader audience, I’d likely consider a different approach.
Additionally, if you prefer not to use SFTP, there’s a more makeshift method you could consider. It involves uploading files through Samba and then moving them via the command line. I once found myself in a situation where I didn’t have my laptop and needed to create a public share quickly. I uploaded the files using my smartphone’s Samba folder (connected through VPN) and then moved the files using the Cockpit interface on my FreedomBox. While this isn’t part of my regular workflow, it served as a convenient workaround in a pinch when I only had my smartphone at hand.
This is for me and my boyfriend, so somehow like you.
We have been using a Synology NAS for more than 10 years, we never store anything locally on a computer, everything is on the NAS. On the local network, we use samba. Remotely, we use the web interface, my boyfriend also likes to use the Synology app on his phone to access files from anywhere.
Samba + sharing can replace this easily. For remote upload, I may configure an SFTP app on his phone and laptop, but I need to make it so that he can’t get confused and upload things not in the right place.
What is really missing is backups configured by plinth, but I could configure that manually with rsync or borg. I tested OpenMediaVault, I don’t feel that it would really reduce my work for that, so I will try with FreedomBox.
Did you have something specific in mind?
I feel that the current documentation of the sharing app is lacking some advice. I now see what to write for the personal use case, but for a broader audience, I don’t know.
[quote=“Avron, post:3, topic:2902”]
I noticed your mention of using a Synology NAS for storage and access, both locally via Samba and remotely through the web interface or a smartphone app. This prompted me to conduct a bit of an experiment. It turns out that you can actually create a share for the Sharing app within the open_share Samba share. While it’s not the most conventional method, it does offer a workaround to avoid using SFTP, making it simpler for your boyfriend and you to upload files directly to a shared folder accessible via the Sharing app. I haven’t tested this with home or group shares, so the results there might vary. If you’re open to testing any of these options, I’d love to hear how it works out for you.
Additionally, for remote file access, setting up OpenVPN could be a viable solution. I use shortcuts in my file manager for accessing my Samba shares both on my local network and through VPN. When I’m away, this setup allows me to use my shares as though I were at home, potentially replacing the need for the Synology web interface or smartphone app. You could even set up similar shortcuts on a smartphone file manager if you have OpenVPN configured there.
That being said, your point stands: there isn’t a direct, straightforward method to upload files, and these workarounds may not be immediately obvious or simple for the average user.
Regarding hosting services for a wider audience, I don’t currently have any specific plans. As I mentioned in a recent post, I’ve faced challenges in encouraging people to adopt self-hosted technologies. In one instance, while collaborating on a project, I needed to allow someone to upload files to my server. Since I had it installed at the time, I opted to use bepasty, creating a temporary password for the collaborator, and then removed the password post-upload. This approach was preferable to creating a new user account for a single use case and worked quite effectively.
At present, my view is that most sharing-focused apps are best suited for personal use or within a tight-knit group, like family or close friends. Either that or they seem to fit scenarios where an admin primarily manages file distribution and creation of shares, rather than enabling end users to initiate sharing.
I’ve read that integrating Nextcloud into FreedomBox is being considered. If that happens, it might shift the dynamics, allowing end users more autonomy in both sharing files and creating shares.
I tried, it works. I will try switching from my NAS to this. This NAS still works fine but the vendor has abandonned it for many years (officially not but in reality yes), the software is not free software so no one else can help. Also, I don’t think it allows booting from a USB stick.
I tried, it did not work. But as I said, the remove access is mostly for read, and for that, sharing the samba folder works fine.
At least, I want clarify what is possible in the documentation, and sharing a whole samba share or a directory in it is something worth mentioning. The sftp as well, with caveats that can be explained.
I found the suggeted app slcl interesting because it is super light and simple, but as long as it isn’t a debian package it can’t be used.
I am also running a Seafile server on another machine. The installation is a bit of work, but the there is close to zero maintenance work. This makes it pretty easy to upload things via a web interface, but it also has synchronization clients that work really well.
Still, Seafile does a lot more than what I need, but Nextcloud is even far worse from that perspective. Usually, the more features something has the more difficult it is to configure, use and maintain, which is was I preferred to avoid Nextcloud. I have also read that, for the same functions, Nextcloud also requires a lot more processing power than Seafile.
Great to hear that the workaround worked for you! It’s indeed a neat solution and I agree that documenting it could be beneficial for future reference.
Regarding using Samba shares via OpenVPN, I’m curious why it didn’t work for you since it’s a setup I actively use. When I’m away from home, I can access my Samba shares seamlessly through OpenVPN. If you’re interested, I’d be happy to share the specifics of how I set this up.
I’m intrigued by your mention of Seafile; it’s not something I’ve explored before. I’ll check it out. One might also consider using Syncthing with the Samba+Sharing shares for a similar hands-off syncing and upload experience. Though, I think it adds some overhead. I disabled Syncthing myself as it didn’t align with my workflow at the time. But if it suits your needs, integrating it with your shares could streamline your process.
As for Nextcloud, I share your view on its somewhat bloated nature. I’m happy that they are including it for those who might like to self-host it. But, it’s not for me. For a project, our IT enthusiast group once set up Nextcloud alongside Collabora, which proved to be resource-intensive and got minimal usage. I think FreedomBox offers a variety of apps that can cover most needs without the heft of a larger service like Nextcloud.