Nextcloud mounting so to use it as an FTP server

Status
Not open for further replies.

Pancackewaffle

Dabbler
Joined
Aug 19, 2017
Messages
41
i have the latest Freenas 11 version and just used the plugin version for nextcloud installation. I also have a Plex server running in a separate jail with all my movies/tv shows in it that is brought in by sonarr/radarr running in their own respective jails.

my question is, can i have nextcloud running with mounts in these two locations (completed movies and tv shows) so to use it for sharing with my friends (via their own users in the nextcloud interface and sharing) and to use it for uploading files that i downloaded somewhere else?

i'm sure that this is a permissions nightmare but i am unsure on how to go about doing this. i have tried several different things:
- i make a file in the nextcloud interface, then mount a test dataset folder with files in it, i find that the file made through the interface is gone and i can't see anything in the interface from the previously mounted folder.
- i tried the same situation above with changing ownership/permissions before and after the mount; didn't help.

i just can't get the files to show up in the nextcloud interface no matter what i do. is there another location that the files need to hard link to or something?
 
Joined
Jan 7, 2015
Messages
1,155
I kinda always wanted to know how to do this so I just tought myself.. Here is the command that will fix it.. This must be run every time you add things manually. A cron job to run once per day or something might suffice. This command must be run from the nextcloud directory for me it is /usr/local/www/nextcloud but you are using the plugin which I think parks everything in the var directory, youll have to find it because I dont know. Make sure everything is mounted and accessible by the www user. Add the www group to your dataset owner auxillary groups for instance. Edit: This isnt needed after all.

pkg install -y sudo && sudo -u www /usr/pbi/nextcloud-amd64/bin/php /usr/pbi/nextcloud-amd64/www/nextcloud/occ files:scan --all

Then to update again only..
sudo -u www /usr/pbi/nextcloud-amd64/bin/php /usr/pbi/nextcloud-amd64/www/nextcloud/occ files:scan --all

This should reveal any files in the data directories to the GUI.
 
Last edited:

Pancackewaffle

Dabbler
Joined
Aug 19, 2017
Messages
41
So when I am jexec'd into the nextcloud CLI, 2 things happen... I am unsure how to figure out which user the nextcloud service uses (tried switching user to www but that was a no go) so I ran that command anyway and it keeps telling me that PHP isn't a command... I'm not the sharpest FreeNAS tool in the shed. Clarity would be appreciated.
 
Joined
Jan 7, 2015
Messages
1,155
Ok ive spun up a nextcloud plugin to check for you. But you are correct the php commands are not executing. This has to do with the fact that everything is running out of the goofy /usr/pbi/amd64 directories so a couple things must be adjusted. I have hammered out the command for you. sudo -u www /usr/pbi/nextcloud-amd64/bin/php /usr/pbi/nextcloud-amd64/www/nextcloud/occ files:scan --all is what you want.
 
Status
Not open for further replies.
Top