Skip to content

Share directory Upload + Read only #6620

Closed

Description

@jee-r

Hello,

Would it be possible to add an upload + read-only option for a shared folder.

capture d ecran_2017-09-22_22-29-35

Use case
This would allow sharing photos (read-only) with a friend who does not have a nextcloud account, but also to upload his own.

Problem with read and write is that my friend can modify or delete files that i have uploaded.

Thank's

Activity

  1. blizzz commented on Sep 25, 2017

    @blizzz
    Member

    iirc upload requires write. @nextcloud/sharing

  2. rullzer commented on Sep 25, 2017

    @rullzer
    Member

    Yes upload requires write. But delete and update are separate permissions. I think this is more about how do we show yet another use case to the user. I'm sure @jancborchardt would kill me if we just extend that list with every possible option.

  3. jancborchardt commented on Sep 25, 2017

    @jancborchardt
    Member

    I mean, it is a good point cause we also have files drop. The current workaround would be to share your own pictures with a read-only link and give the friend a files drop, or fully editable folder link.

    This would be the options, with the new one in bold:

    • Editing – default
    • Read-only
    • Upload-only (no reading)
    • Read-only with upload

    In this new mode, uploaded files with the same name would automatically need to have a " (2)" appended.

    We could change it from radio buttons to a dropdown instead … what do @nextcloud/designers think?

  4. rullzer commented on Sep 25, 2017

    @rullzer
    Member

    @jancborchardt your solution currently won't work as we don't have multiple link shares as an option.

  5. pixelipo commented on Oct 19, 2017

    @pixelipo
    Contributor

    What about simply having 3 independent (checkbox) items:

    • view (read)
    • upload
    • edit
  6. Schmuuu commented on Apr 30, 2018

    @Schmuuu

    I'm glad somebody opened an issue for this already. I haven't noticed this until a user of mine (family member) informed me about an "accident". When he shared photos via a public link to his friends, he wanted to allow his friends to view the photos and upload additional photos. One person who accessed the public link deleted the photos however.
    At first I was confused why he would allow the deletion of files via a public link, but when I checked, I saw that there are not the same options for public sharing like for internal sharing.

    To be protected against further accidents, it would be nice if this feature request could be implemented soon. I really like the idea of @pixelipo

  7. added this to the Nextcloud 15 milestone on Jul 16, 2018
  8. jeyca commented on Jul 16, 2018

    @jeyca

    What about simply having 3 independent (checkbox) items:

    view (read)
    upload
    edit
    

    I wonder why this hasn't already been in the first place, kind of this has been established already decades ago in linux filesystems.

  9. billetj commented on Jul 19, 2018

    @billetj

    Does anyone know if something has been done for that ?

  10. jwillmer commented on Jul 19, 2018

    @jwillmer

    I found a tutorial on the internet a couple of months ago of a guy who edited the database in order to get this functionality - can't find the link anymore.

    Basically there is a table with all shared folders and there permission levels. The permission level is a number and if u sum the number for upload + view permission and set the result for a folder you get a folder that people can upload to and view the uploaded files. I did this for my Nextcloud instance as well and it works without a problem.

    So this feature contains really not much work. There is basically only the GUI missing to make this wok for all people. For me it is too much of a hassle to setup the development environment only to add this feature and make a pull request - sorry.

  11. 11 remaining items

  12. huuub commented on Apr 5, 2020

    @huuub

    Giving nextcloud a serious chance, pretty disappointed 1 day after installation that this is not possible. Really weird

  13. skjnldsv commented on Apr 5, 2020

    @skjnldsv
    Member

    Ah no, still a duplicate of #8479 (comment)

  14. szaimen commented on Apr 5, 2020

    @szaimen
    Contributor

    @skjnldsv why shouls this be a duplicate of #8479 (comment)?
    There is nothing written about "filedrop and seeing already uploaded files" at the same time....

  15. szaimen commented on Apr 5, 2020

    @szaimen
    Contributor

    This option here is about files drop (can add and list files but not edit them)

  16. skjnldsv commented on Apr 5, 2020

    @skjnldsv
    Member

    There is nothing written about "filedrop and seeing already uploaded files" at the same time....

    Yes, this is just about wording here.
    The underlying issues is the available permissions on link shares.
    This is covered by #8479

  17. gloomytree commented on Aug 12, 2020

    @gloomytree

    Fun fact: It's already possible when you set the "permissions"-value in "oc_share", only a option in the GUI is missing. :(

    Available options can be found in lib/public/Constants.php

    Came here via https://help.nextcloud.com/t/allow-public-upload-and-show-but-not-delete/2874/22 and this page should be indexed higher by google. Permission 5 is neccessary for a lot of usecases and i hope to see a GUI option in the future.

  18. jee-r commented on Aug 15, 2020

    @jee-r
    Author

    Ah no, still a duplicate of #8479 (comment)

    I don't understand your reasoning, why you're closing this issue when it's older. If indeed the two issue are similar then the other one is a duplicate of this one.

  19. marvinjuette commented on Oct 13, 2020

    @marvinjuette

    I like the options you get offered when sharing internally. Why don't use them for public link sharing?

  20. JanKerbl commented on Dec 10, 2020

    @JanKerbl

    Fun fact: It's already possible when you set the "permissions"-value in "oc_share", only a option in the GUI is missing. :(

    Available options can be found in lib/public/Constants.php

    Is there a guide how to do this?

  21. muellerlukas commented on Dec 12, 2020

    @muellerlukas

    Is there a guide how to do this?

    First create a link share, you shoudl get sth like "https://NEXTCLOUDDOMAIN/s/TOKEN". You'll need the token later.

    In Constants.php you can find the permissions

    public const PERMISSION_CREATE = 4;
    public const PERMISSION_READ = 1;
    public const PERMISSION_UPDATE = 2;
    public const PERMISSION_DELETE = 8;
    public const PERMISSION_SHARE = 16;
    public const PERMISSION_ALL = 31;
    

    Just sum the values to "build" your permission. E.g: Create + read -> 4 + 1 -> 5

    Then open your database with phpmyadmin or sth, open the table "oc_share" and search for the row where the token-column matches your token.
    Then set the column "permissions" for the row to the persmission you calculated in the step before.

    Hope this helps.

  22. VChernenkoRT commented on Apr 10, 2021

    @VChernenkoRT

    Is there a guide how to do this?

    First create a link share, you shoudl get sth like "https://NEXTCLOUDDOMAIN/s/TOKEN". You'll need the token later.

    In Constants.php you can find the permissions

    public const PERMISSION_CREATE = 4;
    public const PERMISSION_READ = 1;
    public const PERMISSION_UPDATE = 2;
    public const PERMISSION_DELETE = 8;
    public const PERMISSION_SHARE = 16;
    public const PERMISSION_ALL = 31;
    

    Just sum the values to "build" your permission. E.g: Create + read -> 4 + 1 -> 5

    Then open your database with phpmyadmin or sth, open the table "oc_share" and search for the row where the token-column matches your token.
    Then set the column "permissions" for the row to the persmission you calculated in the step before.

    Hope this helps.

    how fluent, user-friendly is this solution for generic issue noted 5 or more years ago.
    disappointed 1 day after installation by this too

    ... I wish I could do it myself by simply editing few lines in apps/files_sharing/ but there is some "build" magic involved between me and the solution =(

  23. VChernenkoRT commented on Apr 10, 2021

    @VChernenkoRT

    I have changed files_sharing_tab.js* files for PUT /ocs/v2.php/apps/files_sharing/api/v1/shares/10 with permissions: "23" or "7" payload, but server still response with permissions: 31.
    This could be overriden by commenting a line after "normalize to correct public upload permissions" comment in apps/files_sharing/lib/Controller/ShareAPIController.php @~1080 line
    someone plz do something for this to be fixed+released <3
    could possibly mess with 955635c

  24. Ashu11-A commented on Jan 13, 2022

    @Ashu11-A

    É incrivelmente decepcionante como isso não foi implementado ainda, era pra ter saído no Nextcloud 15? Mas se passaram anos e ainda não foi implementado por pura preguiça.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions