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

Fatal Error in log: OCP\Files\NotPermittedException: Could not create path #25028

Closed
doc75 opened this issue Jan 8, 2021 · 4 comments
Closed
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@doc75
Copy link
Contributor

doc75 commented Jan 8, 2021

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Unknown

Expected behaviour

No error message appears in the log

Actual behaviour

Fatal Error raised

Server configuration

Operating system: Official docker image nextcloud:19-fpm

Web server: NGINX

Database: PostgreSQL

PHP version: 7.4.13

Nextcloud version: 19.0.6

Updated from an older Nextcloud/ownCloud or fresh install: Updated from older version

Where did you install Nextcloud from: Docker official image

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.1
  - admin_audit: 1.9.0
  - bruteforcesettings: 2.0.1
  - calendar: 2.0.4
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.4.2
  - contactsinteraction: 1.0.0
  - cospend: 1.0.5
  - dav: 1.15.0
  - deck: 1.2.2
  - documentserver_community: 0.1.8
  - encryption: 2.7.0
  - federatedfilesharing: 1.9.0
  - federation: 1.9.0
  - files: 1.14.0
  - files_external: 1.10.0
  - files_markdown: 2.3.1
  - files_pdfviewer: 1.8.0
  - files_rightclick: 0.16.0
  - files_sharing: 1.11.0
  - files_trashbin: 1.9.0
  - files_versions: 1.12.0
  - files_videoplayer: 1.8.0
  - firstrunwizard: 2.8.0
  - gpxpod: 4.2.2
  - impersonate: 1.6.1
  - keeweb: 0.6.4
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - mail: 1.4.2
  - maps: 0.1.6
  - nextcloud_announcements: 1.8.0
  - notes: 3.6.4
  - notifications: 2.7.0
  - oauth2: 1.7.0
  - onlyoffice: 6.2.0
  - password_policy: 1.9.1
  - photos: 1.1.0
  - privacy: 1.3.0
  - provisioning_api: 1.9.0
  - quota_warning: 1.8.0
  - recommendations: 0.7.0
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - sharebymail: 1.9.0
  - spreed: 9.0.7
  - support: 1.2.1
  - survey_client: 1.7.0
  - systemtags: 1.9.0
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - twofactor_totp: 5.0.0
  - updatenotification: 1.9.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - user_ldap

Nextcloud configuration:

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Config report
{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.virlet.org",
            "cloud.mesdatas.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "19.0.6.2",
        "overwrite.cli.url": "https:\/\/cloud.virlet.org",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "default_language": "fr",
        "default_locale": "fr_FR",
        "skeletondirectory": "",Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
        "default_gocale": "",
        "updater.release.channel": "stable",
        "loglevel": 2,
        "data-fingerprint": "3ed95b91e32c66b94e2299d5d677f59b",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        }
    }
}

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Firefox

Operating system: Mac

Logs

Web server error log

Web server error log
# Request corresponding to the nextcloud.log extract below
172.18.0.2 - - [01/Jan/2021:08:32:06 +0000] "GET /remote.php/dav/addressbooks/users/<user>/<addressbook>/<uuid>.vcf?photo HTTP/1.1" 500 13383 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" "<ip address>"

Nextcloud log (data/nextcloud.log)

Nextcloud log
{
  "reqId": "3f9TAxYm4UDxNCREm7tH",
  "level": 4,
  "time": "2021-01-01T08:32:06+00:00",
  "remoteAddr": "37.165.161.100",
  "user": "<user>",
  "app": "webdav",
  "method": "GET",
  "url": "/remote.php/dav/addressbooks/users/<login>/<addressbook>/<uuid>.vcf?photo",
  "message": {
    "Exception": "OCP\\Files\\NotPermittedException",
    "Message": "Could not create path",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/Files/SimpleFS/SimpleFolder.php",
        "line": 90,
        "function": "newFile",
        "class": "OC\\Files\\Node\\Folder",
        "type": "->",
        "args": [
          "nophoto",
          ""
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/CardDAV/PhotoCache.php",
        "line": 113,
        "function": "newFile",
        "class": "OC\\Files\\SimpleFS\\SimpleFolder",
        "type": "->",
        "args": [
          "nophoto",
          ""
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/CardDAV/PhotoCache.php",
        "line": 82,
        "function": "init",
        "class": "OCA\\DAV\\CardDAV\\PhotoCache",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\SimpleFS\\SimpleFolder"
          },
          {
            "__class__": "Sabre\\CardDAV\\Card"
          }
     Nothing relevant   ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/CardDAV/ImageExportPlugin.php",
        "line": 104,
        "function": "get",
        "class": "OCA\\DAV\\CardDAV\\PhotoCache",
        "type": "->",
        "args": [
          8,
          "<uuid>.vcf",
          -1,
          {
            "__class__": "Sabre\\CardDAV\\Card"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpGet",
        "class": "OCA\\DAV\\CardDAV\\ImageExportPlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 474,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:GET",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 251,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 319,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 320,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 167,
        "args": [
          "/var/www/html/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/lib/private/Files/Node/Folder.php",
    "Line": 192,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0",
  "version": "19.0.6.2"
}

Browser log

Browser log
Not available
@doc75 doc75 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 8, 2021
@szaimen
Copy link
Contributor

szaimen commented Jun 22, 2021

Thank you for taking the time to report a bug! 👍

As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com
If you wish support with setup issues from Nextcloud GmbH we offer this as part of the Nextcloud subscription. Learn more about this at https://nextcloud.com/enterprise/

@szaimen szaimen closed this as completed Jun 22, 2021
@doc75
Copy link
Contributor Author

doc75 commented Jun 22, 2021

@szaimen what makes you think this is a setup issue in the information I provided ? That would help me to understand the information that lead to your conclusion and trace the issue. Nextcloud seems to work fine, but from time to time this error appears in the logs, so I am really interesting to get more insight on where the problem could come from.

@szaimen
Copy link
Contributor

szaimen commented Jun 22, 2021

Most likely the permissions are not set correctly for all needed paths.

@doc75
Copy link
Contributor Author

doc75 commented Jun 22, 2021

Most likely the permissions are not set correctly for all needed paths.

I have checked and all files and directory below  data belong the the correct user (www-data) in my case. So I guess the issue is not related to permissions on files. Nevertheless issue seems to be gone since I migrate to NC20 and then NC21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants