Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with direct link on files? #5523

Closed
rgl1234 opened this issue Jun 23, 2017 · 8 comments
Closed

Bug with direct link on files? #5523

rgl1234 opened this issue Jun 23, 2017 · 8 comments

Comments

@rgl1234
Copy link

rgl1234 commented Jun 23, 2017

Steps to reproduce

  1. Two users who have access to the same external smb/cifs storage
  2. One user wants to share a direct link to the other user/users by clicking on the files "Details" and then "Copy direct link (only works for users who have access to this file/folder)" button
  3. The user sends this link to another user who has access to the same file

Expected behaviour

Other user/users should be able to access the file by the link received from the first user

Actual behaviour

The user who receives the link has no access to this link. He gets the error message: "File could not be opened".

Server configuration

Operating system:
Ubuntu 16.04

Web server:
Apache

Database:
Postgresql

PHP version:
7

Nextcloud version: (see Nextcloud admin page)
12.0.0

Updated from an older Nextcloud/ownCloud or fresh install:
yes

Where did you install Nextcloud from:
zip

@rullzer
Copy link
Member

rullzer commented Jul 22, 2017

I'm guessing this doesn't always work with external storage as the fileids can be different.
right @icewind1991 ?

@MorrisJobke
Copy link
Member

This only works if it is the same storage configured in nextcloud itself. If the storage is configured by the admin and then uses the same global credentials (that are entered by the admin) this works. If this is configured per user it looks from the nextcloud point of view like 2 completely different file trees and there is no way that Nextcloud knowns that they refer to the same file on the storage.

@rgl1234
Copy link
Author

rgl1234 commented Aug 30, 2017

Hi Morris
Thanks for your reply. I checked it again, because I did exactly what you said. I have the same storage configured in nextcloud itself by myself as member of admin-group. The same storage is available for different users. As you can see in the attached screenshot, the same location has different ids when logged in with different users...... Am I doing someting wrong?
Thanks for your help.
nextcloud_id

@MorrisJobke
Copy link
Member

Could you check the database table oc_storages for entries. Maybe they are separate anyways.

@rgl1234
Copy link
Author

rgl1234 commented Aug 30, 2017

you are right. In oc_storage I have an entry for every user like

smb::user1@nextcloud.local//folder//
smb::user2@nextcloud.local//folder//

So I think it might have someting to do with my storage-configuration. To allow sharing on that storage, I have chosen to save credentials in database for the logged in user. I had to do it like that, because I have a scenario, where users are authenticated via ldap and needs to have the same permissions in nextcloud as set on the smb-files-storage.

Is there an other way to have a working configuration in my scenario where I can use the nextcloud-id?

thanks for your help
nextcloud_id_storage

@MorrisJobke
Copy link
Member

With login credentials this will not work, because it is a different storage for every user (storage = used credentials x mount) and it would only work if all users would use the same credentials, like the admin specified global credentials above this table.

So this is sadly not working how you thought and it's not that likely that it ever will be, because of the underlying architecture we use.

@rgl1234
Copy link
Author

rgl1234 commented Sep 2, 2017

Thanks for your comment. What we have is a central storage on a windows-server that users can access directly as a windows-drive. I tried s scenario to have the same conntent availabla in nextcloud using the same file- and directory-permissions that are set on the windows-server. It works as expected but as you explained, it will not be possible to have the same file-ids in nextcloud, even though it is exactly the same file on the external storage. So thats really bad...
It would be great, if in our scenario, nextcloud would be able to recognize those multiple storages as identical storage-location for every user, to have the same ids in nextcloud and then to be able to use nextcloud with all of its features.

@rgl1234
Copy link
Author

rgl1234 commented Nov 22, 2017

I am still looking for a solution for my problem.
@MorrisJobke You don't think that there could be a solution for that, if nextcloud could recognize a situation, where an identical storage is mounted several times by different users?
This would realy help us a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants