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

Shared files are duplicated when moved to subdir #8301

Closed
pawlosck opened this issue Feb 11, 2018 · 4 comments
Closed

Shared files are duplicated when moved to subdir #8301

pawlosck opened this issue Feb 11, 2018 · 4 comments

Comments

@pawlosck
Copy link

pawlosck commented Feb 11, 2018

Steps to reproduce

  1. Create empty file (e.g testowy.txt) in root dir and enter some text

  2. Share this file with group (I added group "users" - all users are members of this group)

  3. Create empty dir (e.g "Katalog testowy") in root dir

  4. Move shared file (testowy.txt) to dir "Katalog testowy". You have to be logged in as owner this file and dir

  5. File is still visible in root dir for other users. "Katalog testowy" is not visible for other users.
    Expected: I think, subdir should be visible for others users, but files inside dir not, if are not shared.

  6. Share dir "Katalog testowy" with other users
    Expected: Subdir should be visible for other users when shared (OK)
    Shared file should be visible only in "Katalog testowy". At the moment, file is visible in subdir (Katalog testowy) only for owner. Other users can see this file in root dir and subdir. When modify this file in root dir (non owner "File" app), file in subdir is modified too.

  7. Create and share file inside subdir as owner. File is visible for owner and other users in subdir

Server configuration

Operating system: Debian9
Web server: Apache 2.4.25
Database: sqlite 3.16.2
PHP version: 5.6.30
Nextcloud version: (see Nextcloud admin page): NextCloud 13 (stable)
Updated from an older Nextcloud/ownCloud or fresh install: fresh instalation

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

No errors have been found.

List of activated apps:
Enabled:

  • activity: 2.6.1
  • announcementcenter: 3.1.1
  • audioplayer: 2.2.5
  • bookmarks: 0.10.1
  • calendar: 1.6.0
  • checksum: 0.3.5
  • circles: 0.13.6
  • comments: 1.3.0
  • contacts: 2.0.1
  • dashboard: 4.0.5
  • dav: 1.4.6
  • deck: 0.3.0
  • federatedfilesharing: 1.3.1
  • federation: 1.3.0
  • files: 1.8.0
  • files_external: 1.4.1
  • files_frommail: 0.1.0
  • files_markdown: 2.0.1
  • files_opds: 0.8.8
  • files_pdfviewer: 1.2.0
  • files_sharing: 1.5.0
  • files_texteditor: 2.5.1
  • files_trashbin: 1.3.0
  • files_versions: 1.6.0
  • files_videoplayer: 1.2.0
  • firstrunwizard: 2.2.1
  • flowupload: 0.0.6
  • gallery: 18.0.0
  • gpxedit: 0.0.8
  • gpxmotion: 0.0.6
  • gpxpod: 2.2.2
  • logreader: 2.0.0
  • lookup_server_connector: 1.1.0
  • metadata: 0.6.0
  • mood: 0.3.3
  • music: 0.5.5
  • nextcloud_announcements: 1.2.0
  • notes: 2.3.2
  • notifications: 2.1.2
  • oauth2: 1.1.0
  • ocdownloader: 1.5.5
  • ocsms: 1.12.2
  • ojsxc: 3.3.2
  • onlyoffice: 1.2.0
  • password_policy: 1.3.0
  • phonetrack: 0.1.1
  • polls: 0.8.1
  • provisioning_api: 1.3.0
  • rainloop: 5.0.6
  • serverinfo: 1.3.0
  • sharebymail: 1.3.0
  • socialsharing_email: 1.0.3
  • spreed: 3.0.1
  • spreedme: 0.3.11
  • survey_client: 1.1.0
  • systemtags: 1.3.0
  • tasks: 0.9.6
  • theming: 1.4.1
  • twofactor_backupcodes: 1.2.3
  • unsplash: 1.0.5
  • updatenotification: 1.3.0
  • w2g2: 0.9.9
  • weather: 1.5.1
  • workflowengine: 1.3.0
    Disabled:
  • admin_audit
  • encryption
  • mail
  • user_external
  • user_ldap

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Firefox 58.0.2 (64 bity)

Operating system:
Kubuntu

@tflidd
Copy link
Contributor

tflidd commented Feb 12, 2018

File is still visible in root dir for other users. "Katalog testowy" is not visible for other users.
Expected: I think, subdir should be visible for others users, but files inside dir not, if are not shared.

By default, a user only sees the folder or file shared with him. The above structure is not shown! So a single file is always shown directly without the folder containing it. In your case you'd unshare the fiile and then share the folder Katalog testowy with the group (if the users use the NC client, it will delete the folder from their sync folder and download the new shared folder).

@pawlosck
Copy link
Author

Ok, I understand logic this case, but should be option to auto share directory structure, when user share file.

For me, bigger problem is that, when owner move shared file to subdir other people sees two files. Most of people will be think that these files are not the same file. I modified one file and file in subdir was modified too. What if it will be important file. User lost data, because will be think that is different file. It should be fixed.

@tflidd
Copy link
Contributor

tflidd commented Feb 15, 2018

Imagine we avoid the same file to be shared with you twice. It can still happen, that there is a overlap between shares (especially with resharing, server-to-server-sharing etc.). If someone already share a file with you, and someone different wants to share a folder that contains the same file, what do you want to happen (the sharing is not possible, only the file is missing, what if the permissions are different-> e.g. in general you can only read a folder and a specific file is shared with editing permission)?

@MorrisJobke
Copy link
Member

Imagine we avoid the same file to be shared with you twice. It can still happen, that there is a overlap between shares (especially with resharing, server-to-server-sharing etc.). If someone already share a file with you, and someone different wants to share a folder that contains the same file, what do you want to happen (the sharing is not possible, only the file is missing, what if the permissions are different-> e.g. in general you can only read a folder and a specific file is shared with editing permission)?

Current behavior makes sense and we will keep it like that for now.

Thanks for the report anyways.

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