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

[10.0.0alpha] skeleton throws error, if files exists via share #27375

Closed
felixboehm opened this issue Mar 13, 2017 · 8 comments
Closed

[10.0.0alpha] skeleton throws error, if files exists via share #27375

felixboehm opened this issue Mar 13, 2017 · 8 comments

Comments

@felixboehm
Copy link
Contributor

felixboehm commented Mar 13, 2017

  • create new user
  • share file from skeleton (e.g. ownCloud Manual.pdf) with this new user
  • login with this new user (first time)
    -> login fails with error page

Logging:

{"reqId":"vE4dJqAXiBr8yHlYzAav","remoteAddr":"172.22.0.1","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotPermittedException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"
#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(366): OC\\\\Files\\\\Node\\\\File->fopen('w')\\n
#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(344): OC_Util::copyr('\\\/var\\\/www\\\/ownclo...', Object(OC\\\\Files\\\\Node\\\\Folder))\\n
#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(399): OC_Util::copySkeleton('patrick', Object(OC\\\\Files\\\\Node\\\\Folder))\\n
#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(458): OC\\\\User\\\\Session->prepareUserLogin(true)\\n
#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(295): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n
#5 \\\/var\\\/www\\\/owncloud\\\/core\\\/Controller\\\/LoginController.php(198): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n
#6 [internal function]: OC\\\\Core\\\\Controller\\\\LoginController->tryLogin(*** sensitive parameters replaced ***)\\n
#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(159): call_user_func_array(Array, Array)\\n
#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n
#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(98): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'tryLogin')\\n
#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('LoginController', 'tryLogin', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n
#11 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n
#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n
#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(898): OC\\\\Route\\\\Router->match('\\\/login')\\n
#14 \\\/var\\\/www\\\/owncloud\\\/index.php(49): OC::handleRequest()\\n
#15 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/File.php\",\"Line\":108}","level":3,"time":"2017-03-13T14:54:29+00:00","method":"POST","url":"\/index.php\/login","user":"patrick"}

Related issue describes different behavior: #16450

@felixboehm felixboehm added Type:Bug p2-high Escalation, on top of current planning, release blocker labels Mar 13, 2017
@PVince81
Copy link
Contributor

Argh, maybe the code changes in a way that changed the symptoms.

Increasing to sev-high unless there is a good workaround.

@owncloud/qa can you add a test for this ?

@PVince81 PVince81 added sev2-high and removed p2-high Escalation, on top of current planning, release blocker labels Mar 13, 2017
@SergioBertolinSG
Copy link
Contributor

The problem is that this test pass in integration tests.

I've just tried this on current master:

  Scenario: Sharing something from the skeleton
    Given user "user0" exists
    And user "user1" exists
    And file "/textfile0.txt" of user "user0" is shared with user "user1"
    Then user "user1" should see following elements
      | /FOLDER/ |
      | /PARENT/ |
      | /PARENT/parent.txt |
      | /textfile0.txt |
      | /textfile1.txt |
      | /textfile2.txt |
      | /textfile3.txt |
      | /textfile4.txt |
      | /welcome.txt |
      | /textfile0%20(2).txt |

It passes without any problem, I guess some step counts as login.

@SergioBertolinSG
Copy link
Contributor

SergioBertolinSG commented Mar 15, 2017

Ok it passes because every new user logs in when being created: https://github.com/owncloud/core/blob/master/tests/integration/features/bootstrap/Provisioning.php#L84-L89

@SergioBertolinSG
Copy link
Contributor

I've run tests about sharing (just sharing-v1.feature) and removing that piece of code these tests fail:

features/sharing-v1.feature:255
features/sharing-v1.feature:270
features/sharing-v1.feature:355
features/sharing-v1.feature:366
features/sharing-v1.feature:390
features/sharing-v1.feature:410
features/sharing-v1.feature:1164

I think it is better to keep it as it is. And test this manually.

@PVince81 PVince81 added this to the 10.0 milestone Mar 30, 2017
@PVince81
Copy link
Contributor

Can't reproduce this on master by sharing "welcome.txt", even in read-only mode.

Also cannot reproduce on 10.0 beta.

I tried creating users both with the users page and also on the CLI, same result.

@PVince81
Copy link
Contributor

The integration tests do fail with the trick from @SergioBertolinSG, but not because of a permission issue.
It's the symptom from #16450 where the skeleton files overwrite existing shares.

I'm not able to get an error login page.

Maybe the permission on the user's data folder were wrong ?

@PVince81
Copy link
Contributor

PVince81 commented Apr 4, 2017

Closing due to lack of feedback, not reproducible and possibly obsolete

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants