Skip to content

No permission on shared folders while permission is set. -> 6.0.0a #6463

Closed

Description

@githubrsys

OC Version

  • 6.0.0a

Folder is Shared with permission

The Share

No permission for this user

The NOT permission

So this is quite annoying. Any suggestions ?

Activity

  1. karlitschek commented on Dec 17, 2013

    @karlitschek
    Contributor

    @schiesbn

  2. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    @githubrsys works for me. I also tried using a dir name with a "&" character and it works.

    Can you try sharing any other folder and see whether the issue still appears ?
    Try with a folder under the root '/TestRoot' then another one under whichever folder the "Privat David & Elisa" is in.

    What's the real path of "Privat David & Elisa" in the original user's storage ? Just trying to find out whether there are conflicting permissions, which shouldn't happen.

  3. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81 I´ve now generated a new testuser to share with. Took an existing folder under root named "Werbung" so there are no "$&*" Items in the path
    with the same result. The testuser cannot change the folder. . .

    BTW: It´s an migrated OC instance from 5.x

  4. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    We need more detailed info.
    Can you please fill in https://raw.github.com/owncloud/core/master/issue_template.md ?

    Also, can you try this on your database:

    select * from oc_share;
    

    to check the permissions on the two folders you shared.

  5. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    Now I have created a new folder named "testfolder" whithin the new created user and shared it back to my user. In the sharing process you can see that there is one more checkbox and my user is able to change the content.

    Works here

    It seems that only old users have this issue. New created users don´t.

    New created users generate permission "31" old users do "27"

  6. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    What do you mean with "one more checkbox" ?
    Does it mean it works when you share it this way ?

  7. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    Look at the screenshots. The first one is the sharing process from an old user, which has not the checkbox create. The last screenshot shows the process from a new generated user which has the checkbox "create". So the issue seem to be within the user itself, so it seems.

  8. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Ok, it's not related to "new" users.
    It looks like the german translation has "eaten" the "hinzufügen".
    Please try switching to english when creating the share.

    I'll have a look what is causing this.

  9. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    It is not caused by the translation. If I change the language it remains faulty.

    foo

  10. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Ok, you're right.

    I think I got steps to reproduce:

    1. Login as "user1"
    2. Create a new file "test.txt".
    3. Click "Share"
    4. Expand the sharing, see that the "create" checkbox is there
    5. Refresh the browser page
    6. Click "Share" on "test.txt" (which is already shared)
    7. Expand the sharing, see that "create" disappeared...
    8. Unshare
    9. Refresh the page
    10. Reshare.
    11. Still no "create" checkbox

    It looks like when a file was shared at least once before, the "create" never appears again.
    Only new files that have never been shared have it.

    Weird stuff...
    I'll check the code to see under what conditions that checkbox is being hidden.

  11. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Looks like the "possiblePermissions" is read from the file's tr attribute data-permissions.
    For some strange reason those "broken" files have a permission of 27 instead of 31 (all permissions).

  12. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    getDirectoryContents() returns the wrong permissions... need to go deeper.

  13. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    I checked the oc_permissions table and newly created files automatically get 27 as permission (all except create).
    Still, in the UI data-permissions is 31 for some reason until the file is shared.

    Something weird going on with file permissions. CC @schiesbn @icewind1991

  14. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Ok... I was actually testing with files. Files should never have the "creatable" checkbox. There's another but that still shows the checkbox initially.

    Will try again with subdirs.

  15. 8 remaining items

  16. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Can you try sharing a folder from Elisa's account and see whether the permission issue appears there ?
    If it doesn't, then it is definitely related to the hash-type storages.

    What was the first OC version you migrated from ?

  17. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    I dived into another instance of the server which was initially setup with 5.0.14 and was migrated to 6.0.0a which seems to have the same issue.

    Another instance

    SEE

    My instance sharing from elisa to me

    So the issue is that the storages are not migrated to new layout -cleanly.

  18. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    @githubrsys cool, thanks for the info.
    Did your 5.0.14 was migrated from OC 4 ? I don't know when those hash storage ids existed (hope @icewind1991 can help clarifying).

    As far as I understand, the evolution of the storage ids is: hash id -> "local::" home storages -> "home::" storages.

    I do know that there was no migration from "local::" to "home::" (#6493), BUT ownCloud 6 should work fine with "local::" storages. So sharing files from the "elisa" user should work fine.
    Can you try this out to confirm this ?

    @icewind1991 can we safely manually change the hash ids in the DB to the home ones ?

  19. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Ok, just saw your message. So sharing from "elisa" indeed works which is good news.

    If you like we can try and fix your DB now.
    Please backup first.
    Then replace the hash id with "home::" and your user name.
    For Elisa, if you like, you can also replace it with "home::elisa" (notice that the colon appears twice)

    As part of #6493 a script will be developed to fix these issues in the future (but might take some time until this is done and tested)

  20. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    TBH: I don´t remember really. Perhaps this is an information which should be logged in the DB for further development. So it is possible to see the history of the used cores.

  21. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    Changing the storages worked flawless. The permission do not alter. I suppose to change them manually once ?

  22. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Yes, you only need to do this once.
    Newly created users will automatically use the "home::" format.

    If this works correctly for you, let's close this ticket and follow up in #6493

  23. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    I did not alter the permissions but truncated the permissions table. After that my user could see the "create" checkbox.

    So everything is fine now.

  24. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    Glad it works again for you 😄

  25. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    Thank you for your help and patience.

    I can only suggest to optimize the quality insurance process if there´s any :-)
    Every release has a lot of "no go" glitches, and a smooth migration is really heavily needed to avoid the loss of trust into the project.

    Cheers.

  26. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    @githubrsys yes, we need to improve migration testing.

    We do test migrations, but it's difficult to cover all possible cases.
    There are many parameters like whether you upgraded from older versions (OC 4), what PHP version you had/have (PHP bugs) which database, OS, which apps are installed, what data is in the DB, etc. So it's hard to cover everything.

    We hope that more people can help with testing such cases. But it seems most people prefer to wait for the final release to try it out. If more people could help testing, at least from the RC versions, it might help a lot (without forgetting to backup of course). 😄

  27. githubrsys commented on Dec 18, 2013

    @githubrsys
    Author

    @PVince81

    It´s really a problem that a lot of people do wait. But in the end they do wait as they expect an smooth working final release. So the only possibility is to gain the group of beta testers. How this ever is made.

    Other projects can run unit tests where a lot of cases are covered. It is no excuse to say we have a lot of parameters. This is true to every other project. One thing is clear cut. The better the last stable release was and the better the migration scenario is tested, the better it is for the project at all.

    So the task is:

    • write standard migration scenarios with different circumstances
    • write standard installation scenarios with different circumtances
    • let those scenarios get run by unit and human tests, where the human has to be an dedicated person that feels responsible to be part of the beta team. Invite people to do so.
    • don´t release stables too often
    • consider to initiate or name a "Long Term Support" Version which is know to be the most stable release
    • keep in mind that less new users come to this project but more users are "stickers" where the migration becomes more and more important.

    just my 84 cents of wisdom

    cheers

    David

  28. PVince81 commented on Dec 18, 2013

    @PVince81
    Contributor

    There's a project in progress for automated tests which should hopefully help improve this in the future: https://github.com/owncloud/acceptance-testing

  29. locked as resolved and limited conversation to collaborators on Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions