Permissions when mounting a local folder

help

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. install oc 9.1 from ubuntu package archive
2. once system is running, mount a local folder /localfolder which is also used by samba
3. unable to write files in /localfolder due to permissions ( owned by samba )

Expected behaviour
Tell us what should happen

Actual behaviour
Tell us what happens instead

Server configuration
Operating system: Ubuntu 16.04
Web server: Stock Apache
Database: Mysql
PHP version: Stock PHP
ownCloud version (see ownCloud admin page): 9.1 installed from Ubuntu packages
Updated from an older ownCloud or fresh install: fresh install
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

ownCloud log (data/owncloud.log)

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

Is there any way I can mount a local folder which is used by a windows SMB server without changing the permissions of this directory to www-data?


#2

Yes, you mount it as admin or user via "external storage".


#3

Thanks hodyroff

I did that but then I can only read from this folder as I am not the owner or group when accessing via owncloud. If I change owner to www-data, then I cannot access the folder from my windows shares. So I don't know what I can do now.

I'd like to access the folder using oC, as well as access the folder using my windows shares via SAMBA.

Hope I have made myself clear!


#4

Did you not use your Samba user credentials for the external storage mount? You should mount it as the same person you mount it from Windows.


#5

Hi Hodyroff

Yes, that is what I did. From the admin page, I chose SMB/CIFS and entered the folder name and mount name using my usual username and password as I use in windows.

The SMB/CIFS folder has different permissions - it is owned by me on the machine as opposed to www-data, which I understand owncloud requires.

So I feel a bit stuck now.