SMB and cloud access for files simultaneously

Joined
Jan 24, 2022
Messages
9
Hello

What is the best way to provide an access to the files via SMB in the office and via some cloud access outside, same files. Synology gives the same possibility with their internet access and the same files can be accessed via SMB share. Nextcloud does not provide this functionality. Is there any simple way to do this?

Thanks.
 

ver151set

Dabbler
Joined
Jan 28, 2015
Messages
37
Only ways I can think of would be either

You could run a vpn server at the office and outside the office connect to vpn to access smb shares (how i do it)

Use nextcloud for primary storage and mount via webdav instead of using smb

Could be better ways but Im no pro
 
Joined
Jan 24, 2022
Messages
9
You could run a vpn server at the office and outside the office connect to vpn to access smb shares (how i do it)
I'm doing the same with VPN server on the Mikrotik router, but client was using Synology before and asks me to make the same )
 

weingeist

Dabbler
Joined
Feb 6, 2017
Messages
30
This is a very good question, that I am also searching answers for. Thought I'd share my experiences in this topic.

In my oppinion, it doesn't make sense to have Nextcloud as primary storage with local access over webdav, because it cripples the abilities of the zfs snapshots: only file versions, not folder versions, therefore no recovery of deleted files through snapshots. Deleted files exists in Nextcloud, but occupies additional storage, which makes no sense whene you have much more powerful snapshots (from a user point of view).

For me right now, the best way is adding Truenas data through external storage in Nextcloud, but then I still have a permissions issue, as Nextcloud writes data as 755 and all tries with umask on www user, php startup deamon, etc have failed. Every night, a cron job resets all permissions to 770 (small home NAS, home group has full access on everything).

Last thing I tried, was directly mounting the per user files folder in nextcloud (/mnt/files/dummyuser/files) However, this folder is not configured to register changes outside of Nextcloud, opposed to Externnal Data. And also doesn't solve the permission issue.

Even though External Data adds an additional storage layer within the Nextcloud home dir, it seems as it would get closest to the desired cloud and smb access. Anybody has any idea to change the Nextcloud umask?
 

Flachzange

Dabbler
Joined
Jul 10, 2022
Messages
16
I asked myself the same question as I had a seperate OwnCloud server and a SMB server in the past which led to massive redundancy and chaos. And I must say Nextcloud with external storage is actually a well-working solution.

My setup:
- TrueNAS Scale
- Truecharts Nextcloud App
- Dataset with ACL configured

In the beginning I messed it up the permissions for the external storage mount. And a good advise here: If you mounted external (local) storage once with non-working permission it is likely not going to work ever until you do a fresh "install" of the app. In my case the ACL is configured to have permitted modify rights to the www-data user and group of nextcloud. Nothing else is actually required. There is no need that www-data is the user or group owner of the local share. In this setup nextcloud writes with the user www-data but does not modify anything else.

Yes, the local mount point adds another "level" to the home dir, but the additional required database space for indexing etc is completely neglectable.

The truecharts app is basically configured plain vanilla (except for the local mount point). I am using traefik as a reverse proxy in addition that also serves the ssl certificates.

For now I am happy with that solution and it serves exactly the purpose.
 
Top