Nextcloud local share permissions / can't upload via nextcloud

corey.lafaei

Dabbler
Joined
Apr 11, 2018
Messages
10
Hello, I recently re-installed freenas from scratch and i had next cloud set up so that one of the datasets is shared across our network on smb and we could also log into next cloud and access the same folder and upload online.

I can successfully access the folder from nextcloud and view all of the files currently. Unfortunatley I am unable to create or upload with in the dataset from next cloud but can create and copy from smb.

Any help would be appreciated. Haven't had a problem with this before.
 

Attachments

  • 1.PNG
    1.PNG
    11.8 KB · Views: 922
  • 2.PNG
    2.PNG
    4.1 KB · Views: 1,013

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi Corey,

Honestly, I have to advise you strongly against such a setup...

Nextcloud is doing everything in its own logic, in the Web Application layer. One consequence is that all files are owned and accessed by the same uid, the one under which the server itself is running. If these files are to be re-shared by Samba, you will not be able to prevent one user from accessing another user's content. Also, there are many things that Nextcloud keeps in its database. Content that will be modified over a channel that bypasses Nextcloud will de-sync that database. Files created will not appears, modified thumbnails will not be updated, etc. It is possible to run a script that will re-sync the database, but this is a permanent break-n-fix way of working. One day, you will end up breaking something that you will not be able to fix.

File versioning, undelete, encryption and many other features will not work and the other features that will end up working will be in a reality that is different than the one expected by the developper. As such, any update to Nextcloud or one of its app will expose you to significant impact.

The proper way to mix Samba shares and Nextcloud is to mount these shares in Nextcloud as external storage. Once done, all accesses are done through Nextcloud.

To have a local copy of the files usable on one's endpoint (desktop or laptop), install the Nextcloud client and sync the user data locally. Again, that will do as expected by Nextcloud, so will be a million time safer.

In all cases, I advise you against bypassing Nextcloud's frontend to reach its backend directly.
 

corey.lafaei

Dabbler
Joined
Apr 11, 2018
Messages
10
Okay, this makes sense. Its a clean install of Freenas and the plugin is from the avaliables list for nextcloud. I don't have an option for SMB on the external storage. Is this an additional app / addon for Nextcloud?

Thanks,
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi again Corey,

On my side, I configured Nextcloud as a docker container in a different host. Still, the idea should remain the same.

Log in Nextcloud as your Administrator account (or however you named that account...)
Go in the Apps sections
Install the App required for mounting SMB share : External Storage
(Be careful, there are few specialized apps for specific external storages like Google. You need the "generic" one)
Once the install is done and the app is activated, go in the Settings section (always as your Admin account)
In the settings section, in the left column, there is one line per configurable app. The one you need here is the one for external storage.
This is where you can configure the mounting of a external storage like SMB. You also configure there who can access it.

Good luck in your setup,
 

corey.lafaei

Dabbler
Joined
Apr 11, 2018
Messages
10
How to I enable SMB on Nextcloud thorugh
Hi again Corey,

On my side, I configured Nextcloud as a docker container in a different host. Still, the idea should remain the same.

Log in Nextcloud as your Administrator account (or however you named that account...)
Go in the Apps sections
Install the App required for mounting SMB share : External Storage
(Be careful, there are few specialized apps for specific external storages like Google. You need the "generic" one)
Once the install is done and the app is activated, go in the Settings section (always as your Admin account)
In the settings section, in the left column, there is one line per configurable app. The one you need here is the one for external storage.
This is where you can configure the mounting of a external storage like SMB. You also configure there who can access it.

Good luck in your setup,

Good Morning, I had done this and the attached image shows that smbclient isn't enabled, how do I enable smbclient.
 

Attachments

  • 3.PNG
    3.PNG
    18.5 KB · Views: 957

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi Corey,

Unfortunately, I am not using the jailed version of Nextcloud as it is in FreeNAS. I am running it from a Docker on a separate host.

What I know of FreeNAS' jails is that they are not meant to be modified manually. It is possible, but only for the most advanced admins and doing that will expose you to difficulties when an update will be pushed by FreeNAS.

So unfortunately, I can not give you more advice that would allow you to do it safely. The closest thing would be to remove the jail, create a Docker VM and then run Nextcloud as a container in that VM. That VM will be linux based and under your control, so adding smbclient will surely be easier and safer.

Good luck,
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Can you describe your setup a little bit more...
Do you have Nextcloud setup within a jail within FreeNas? What are you trying to store on the external drive? What version of php are you running with your nextcloud installation
 

corey.lafaei

Dabbler
Joined
Apr 11, 2018
Messages
10
Can you describe your setup a little bit more...
Do you have Nextcloud setup within a jail within FreeNas? What are you trying to store on the external drive? What version of php are you running with your nextcloud installation

I have now resolved; was an issue will the permissions overall, needed to be unix with other write permissions.
 
Top