Data directory on qnap nas

Hi all,
I installed Nextcloud on Debian 8 and I configure nextcloud data directory directly on nas folder, but I have permission problem, I think.

I created a mount on server so and it’s works:
mount -t cifs // /honasnc -o username=yyyy,password=xxxx,rw

I changed on nextcloud/config/config.php:
‘datadirectory’ => ‘/apnasnc/ncdata’,

When I try to connect I see:
Data directory not writable
Permissions can usually be fixed by giving the webserver write access to the root directory.

But If I change permission and owner the problem remains
What can I do?
Thanks in advance

For SMB-mounts on the filesystem you have to add the owner of the share in your mount command. Add these parameters:
mount -t cifs // /honasnc -o username=yyyy,password=xxxx,uid=33,gid=33,rw

Thanks for you replay, I’ve modified the parameters but nextcloud shows me “Please change the permissions to 0770 so that the directory cannot be listed by other users.” I’ll try to change permission on qnap…

You can also set umask in the mount command.