Can't see files in Nextcloud External Storage App

Status
Not open for further replies.

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
I have Nextcloud (13) set up in a FreeNAS jail.

I mounted a dataset from the FreeNAS to the jail running NC.

In NC, I used the External Storage app to mount the share as “local”.

The mounting of the External Storage was successful, and I can see folders in the /mnt/MyShare, but I cannot see any files.

I am assuming this is probably a permissions issue, but I’m not sure… I tried setting chown -R www:www /mnt/My/Share.

I can make test.txt in any folder via the root@nextcloud jail, and via the NC GUI I can see test.txt, but not any other files or folders.

From the NC GUI, I get "you don't have permission to upload or create files here."

Anybody have any ideas?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Setting permissions in a jail is useless unless they are matched in FreeNAS. So, what is the permissions on the dataset in FreeNAS?
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
Setting permissions in a jail is useless unless they are matched in FreeNAS. So, what is the permissions on the dataset in FreeNAS?

root:wheel currently... I have also tried www:www.... What would the permissions need to be in order to access it?

I guess my understanding of how permissions for mounts into jails works is off... My understanding was that once the dataset was mounted into a jail, the jail permissions would dictate who could access it.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
No they won’t. The permissions are metadata on the files them self’s. You need to have the same User ID and Group ID numbers in the jail as in FreeNAS. So even if you use the same names on users and groups it won’t work unless the UID and GID of the user and group are different.

Also, don’t use root:wheel for anything in production. This means you have users set up with privileged access just to use shares.
Instead think of it this way, users are for governing access for people/services and groups are for governing access to content. Set up one or more groups for content access and then assign the relevant users to those groups.
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
No they won’t. The permissions are metadata on the files them self’s. You need to have the same User ID and Group ID numbers in the jail as in FreeNAS. So even if you use the same names on users and groups it won’t work unless the UID and GID of the user and group are different.

Also, don’t use root:wheel for anything in production. This means you have users set up with privileged access just to use shares.
Instead think of it this way, users are for governing access for people/services and groups are for governing access to content. Set up one or more groups for content access and then assign the relevant users to those groups.

I see....

I have tried everything I can fathom that would allow me to see those files.... I would imagine chown -R www:www /mnt/myshare (from both the NAS and the jail) would let the NC GUI users access the share, but it hasn't...

What's the group that would need permissions in order to access the share in NC?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
No it wouldn’t, sins Nextcloud isn’t running with root as user. You need to check documentation or the rc.d file for what user Nextcloud uses in the plugin. Can’t help you, I always build my own.
 
Status
Not open for further replies.
Top