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

Properly lock share owner parent folders #17181

Closed
PVince81 opened this issue Jun 25, 2015 · 5 comments · Fixed by #17246
Closed

Properly lock share owner parent folders #17181

PVince81 opened this issue Jun 25, 2015 · 5 comments · Fixed by #17246

Comments

@PVince81
Copy link
Contributor

Steps

  1. Enable transactional locking
  2. Create users "user1" and "user2"
  3. Login as "user1"
  4. Create a folder "sub/sub2/folder"
  5. Share "sub/sub2/folder" with "user2"
  6. Login as "user2"
  7. Create a file in "/folder/test.txt" with WebDAV (use slow upload by adding sleep(30) here https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/file.php#L204)
  8. During the upload, login as "user1" and rename "sub"

Expected result

"sub" is locked

Actual result

Rename succeeds.

Versions

ownCloud 8.1 git master (58439c3)

Concern raised by @icewind1991

When the parent folders of "test.txt" are selected to be locked in the owner's tree, they are only selected up to the parent root, which is "sub/sub2/folder". The correct behavior would be to also lock "sub/sub2" and "sub".

@icewind1991 said he was working on a POC and possible fix. The idea would be that whenever a shared storage root is being locked, the storage will automatically lock the parents in the original storage.

CC @jnfrmarks @SergioBertolinSG FYI about this test case

@jnfrmarks
Copy link

@jvillafanez

JP, can we automate this test case with smashbox?

@jvillafanez
Copy link
Member

In fact we should automate all actions over shared files. It's pending to be automated

@PVince81
Copy link
Contributor Author

PR is here #17246

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 1, 2015

@cmonteroluque @karlitschek @DeepDiver1975 moving to 8.1.1.

Needed to make locking more watertight.
See the reproduction steps for a better understanding where the lock is missing in a sharing case.

@PVince81 PVince81 modified the milestones: 8.1.1-next-maintenance, 8.1-current Jul 1, 2015
@MorrisJobke MorrisJobke modified the milestones: 8.2-next, 8.1.1-next-maintenance Jul 2, 2015
@MorrisJobke
Copy link
Contributor

@PVince81 I added this issue to 8.2 milestone and added a backport label to the PR. Once the backport against 8.1.1 is done this ticket will get the 8.1.1 brown label ;)

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

Successfully merging a pull request may close this issue.

5 participants