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

Error creating file from template with external storage #8010

Closed
szaimen opened this issue Feb 18, 2021 · 8 comments · Fixed by nextcloud/server#26396
Closed

Error creating file from template with external storage #8010

szaimen opened this issue Feb 18, 2021 · 8 comments · Fixed by nextcloud/server#26396
Labels

Comments

@szaimen
Copy link
Contributor

szaimen commented Feb 18, 2021

I am not able to create a new file from template when being in a folder that is mounted via the external storage app:
Screenshot_20210218-003141_Nextcloud QA
To reproduce:

  1. Enable the external storage app on your server
  2. Create a local external storage mount with the app and mount it to a user (and make it writeable)
  3. Open the android app, navigate into the external storage folder and try to create a file from template there -> error creating file from template

(But I need to say that this issue is present since a while now and not new in this PR. I just thought it could make sense to show it since this PR addresses this part of the app)

cc @tobiasKaminsky

Originally posted by @szaimen in #8005 (comment)

@szaimen szaimen changed the title Issue creating file from template with external storage Error creating file from template with external storage Feb 18, 2021
@szaimen szaimen added the bug label Feb 18, 2021
@szaimen
Copy link
Contributor Author

szaimen commented Feb 18, 2021

BTW: I get those error messages in the nextcloud log while trying to create a new file with the nextcloud app:
Which is incorrect, because creating a new file from template works in the web UI! So it must something wrong in the Android App that doesn't work!

{
  "reqId": "GRRc90r7BMQq9Um4Ip1q",
  "level": 3,
  "time": "2021-02-18T13:42:46+01:00",
  "remoteAddr": "**SECRET**",
  "user": "szaimen",
  "app": "files",
  "method": "POST",
  "url": "/ocs/v2.php/apps/files/api/v1/directEditing/create?format=json",
  "message": {
    "Exception": "OCP\\Files\\NotPermittedException",
    "Message": "No create permission for path",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/DirectEditing/Manager.php",
        "line": 133,
        "function": "newFile",
        "class": "OC\\Files\\Node\\Folder",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files/lib/Controller/DirectEditingController.php",
        "line": 85,
        "function": "create",
        "class": "OC\\DirectEditing\\Manager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 169,
        "function": "create",
        "class": "OCA\\Files\\Controller\\DirectEditingController",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 100,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 152,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 309,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/ocs/v1.php",
        "line": 88,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/ocs/v2.php",
        "line": 24,
        "args": [
          "/var/www/nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Files/Node/Folder.php",
    "Line": 200,
    "CustomMessage": "Exception when creating a new file through direct editing"
  },
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/8005",
  "version": "20.0.7.1",
  "id": "602e6e924d47b"
}

@tobiasKaminsky
Copy link
Member

@nextcloud/server-triage do you have an idea?

@tobiasKaminsky tobiasKaminsky added the needs info Waiting for info from user(s). Issues with this label will auto-stale. label Feb 18, 2021
@szaimen
Copy link
Contributor Author

szaimen commented Feb 18, 2021

Maybe cc @juliushaertl, too?

@szaimen
Copy link
Contributor Author

szaimen commented Feb 26, 2021

Related nextcloud/server#25787

@juliusknorr
Copy link
Member

Is that only an issue with external storages? Can you share the config you are using for the mount?

@szaimen
Copy link
Contributor Author

szaimen commented Mar 3, 2021

to reproduce:

  1. Make your Nextcloud root folder read only by mounting a local external storage to Nextcloud, making it read only and naming it /.
  2. Create a second local external storage, name it differently and make it writeable.
  3. Connect to your Nextcloud usign the Android app.
  4. Open this second local external storage mount and try to create a new file from template there
  5. When trying to create the new file there, it reports that it couldn't create the file (although the directory is writeable)

@github-actions
Copy link

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@github-actions github-actions bot added the stale label Mar 31, 2021
@szaimen szaimen removed needs info Waiting for info from user(s). Issues with this label will auto-stale. stale labels Mar 31, 2021
@juliusknorr
Copy link
Member

Anyone up for testing nextcloud/server#26396 which should fix the issue?

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

Successfully merging a pull request may close this issue.

3 participants