External storage

Hi, I'm not sure if this is the correct forum where to post my question, but it could be so I try.
I've configurated samba external storage and this is ok.
I've got a shared folder in my Ubuntu 16.04 server, where I share the files with windows users and owncloud users. This is fine also.
The problem I've got and I don't how to solve is the permissions. I want users owncloud have different permissions depending on the folders, in some of them they can do all, in others just read, and finally some others are invisible for them.
The users configuration in Owncloud is like this


The users and groups in Ubuntu are:
administrador:x:1000:usuario
usuario:x:1014
test:x:1016
The samba's users are:
administrador:1000:administrador
usuario:1010:usuario
test:1013:test

The shared folder in the server is /srv/samba/docs, and the permissions of folders and subfolders this:
/srv/samba/docs: drwxrwxr-x
/srv/samba/docs/cliente: drwxrwxr-x
/srv/samba/docs/cliente/archivos: drwxrwxrwx
/srv/samba/docs/cliente/empresa: drwxrwxr
/srv/samba/docs/empresa: drwxrwx
The owner of all is administrador

My idea is:
- users administrador and usuari have all permissions
- test can only write to the folders /cliente/archivos, in the other can read, except Empresa that is invisible

What I'm doing wrong: I understand that:
- administrador can do everything like owner and user of group
- usuario can do everything like a user of group
- test can only do what the others can

When I login in Owncloud like administrador or usuario, all fine. But if I login like test I've got the follow error: Storage not available.
If I add test like a user of administrador, no error, but then the permissions fail.
Any idea? Thanks very much

are you on owncloud 10?

try this maybe

Thanks for your answer. But it's ubuntu server, I haven't installed graphic interface, so, I only use console.
Owncloud 9.16
I've read the link you have suggested. The external storage I use is what I need and it works fine.
The problem is user test. I need it like amember of other (group) and has it's permissions

is this this helpful?

ownCloud will use the file attributes as permissions for each user. This usually means that the permissions that ownCloud will show will be the same for each user under normal conditions.

On the other hand, ownCloud will use the account set up for each user. If the test user uses an account with read-only permissions, the real actions that the test user will be able to perform will be limited to what the server allow for that account, which could be only read the files but not modify them. The ownCloud user could try to upload or modify a file, but he will receive an error.
Following with this idea, if the account can't list / read a folder, the ownCloud user that is using that account won't see that folder.

From my point of view, this is more a problem to setup properly the SMB server the way you want than an ownCloud problem. I'd recommend to check the setup with the "smbclient" CLI and check what you can do from the ownCloud's server with it. If "smbclient" can't access properly with your test account, there isn't anything ownCloud can do to connect to the server

Thanks for your help. Finally I solved it. I had configurated all the users and permissions correctly, but I missed one thing: indicate in samba.conf the valid users or groups. That's all and now works fine