Cant share extern smb/cifs Storage

Hi,

my Owncloud Version is: 10.3.2.2 on Ubuntu 18.04.LTS

I have activated the external storage and successfully integrated a share of our storage system in the Owncloud. The authentication (via LDAP): Save login data in session. The files are all displayed. But if I want to share something, I get the message: sharing is not allowed.
What am I doing wrong?

Without knowing your active configuration, I remember there are mount options for external storages: https://doc.owncloud.com/server/admin_manual/configuration/files/external_storage_configuration_gui.html#mount-options

So you should have the box Enable Sharing checked.

Does this solve your issue?

1 Like

Thanks for the answer but it is not the solution.
This is what my configuration looks like (it`s a german System):

As I said, the folders and files are all visible, but they can’t be shared:
Einstellungen2

The storage is a cifs share on a NetApp.
What other information is needed?

I can download and view but I can’t upload anything to it. Probably a permissions problem. How are they set or processed by LDAP?

This is the log after trying to upload something:

{“reqId”:“XmeQjz4@LRrJCkMhnf4e0QAAAAU”,“level”:4,“time”:“2020-03-10T13:05:20+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“xxxx”,“app”:“webdav”,“method”:“PUT”,“url”:"/owncloud/remote.php/dav/files/xxxx/FilesX_IT/Testport_Andre.txt",“message”:“Exception: HTTP/1.1 500 Could not write file contents: {“Exception”:“Sabre\\DAV\\Exception”,“Message”:“Could not write file contents”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(172): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #32)\n#1 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1094): OCA\\DAV\\Connector\\Sabre\\Directory->createFile(‘Testport_Andre…’, Resource id #32)\n#2 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(527): Sabre\\DAV\\Server->createFile(‘files\/xxxx…’, Resource id #32, NULL)\n#3 \/var\/www\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(96): Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(464): Sabre\\DAV\\Server->emit(‘method:PUT’, Array)\n#5 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(241): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/var\/www\/owncloud\/apps\/dav\/lib\/Server.php(326): Sabre\\DAV\\Server->start()\n#7 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(31): OCA\\DAV\\Server->exec()\n#8 \/var\/www\/owncloud\/remote.php(165): require_once(’\/var\/www\/ownclo…’)\n#9 {main}",“File”:"\/var\/www\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php",“Line”:198}"}
{“reqId”:“XmeQpNUGzBKzPerFfV@5kQAAAA4”,“level”:4,“time”:“2020-03-10T13:05:41+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“xxxx”,“app”:“webdav”,“method”:“PUT”,“url”:"/owncloud/remote.php/dav/files/xxxx/FilesX_IT/doc21775020190523081642.pdf",“message”:“Exception: HTTP/1.1 500 Could not write file contents: {“Exception”:“Sabre\\DAV\\Exception”,“Message”:“Could not write file contents”,“Code”:0,“Trace”:”#0 \/var\/www\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(172): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #32)\n#1 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1094): OCA\\DAV\\Connector\\Sabre\\Directory->createFile(‘doc217750201905…’, Resource id #32)\n#2 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(527): Sabre\\DAV\\Server->createFile(‘files\/xxxx…’, Resource id #32, NULL)\n#3 \/var\/www\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(96): Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(464): Sabre\\DAV\\Server->emit(‘method:PUT’, Array)\n#5 \/var\/www\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(241): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/var\/www\/owncloud\/apps\/dav\/lib\/Server.php(326): Sabre\\DAV\\Server->start()\n#7 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(31): OCA\\DAV\\Server->exec()\n#8 \/var\/www\/owncloud\/remote.php(165): require_once(’\/var\/www\/ownclo…’)\n#9 {main}",“File”:"\/var\/www\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php",“Line”:198}"}

Also double check your admin sharing options.
Can you confirm that only sharing of files/folders on the external mount point doesn’t work?

The frist Picture in my second Post are the admin share options.
I confirm, that on the external mount point sharing of files/folders and upload to external mount point doesn’t work. Download from files/folders works.

Hey,

i have found the following:

The Log-in credentials, save in session mechanism uses the ownCloud login credentials of the user to connect to the storage. These are not stored anywhere on the server, but rather in the user session, giving increased security. The drawbacks are that sharing is disabled when this mechanism is in use, as ownCloud has no access to the storage credentials, and background file scanning does not work.

in:

https://doc.owncloud.com/server/10.4/admin_manual/configuration/files/external_storage/auth_mechanisms.html

which seems to me to explain why you can’t share from the external storage.

This could explain why you can’t upload any new files to the external storage, it looks to me that there are permission problems while writing to the external storage.

Hey Tom42,

Thanks for the advice.
I have changed the authorization from “Save login data in session” to “User and password” and entered a user who has access to everything.
So all functions work as usual.