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

[OC 9.0.2.2] New users can't login to the cloud - "$absolutePath must be relative to \"files" #25535

Closed
xshadow opened this issue Jul 19, 2016 · 14 comments

Comments

@xshadow
Copy link

xshadow commented Jul 19, 2016

Expected behaviour

New users should be redirected to the file index page.

Actual behaviour

Users are redirected to a page that states - internal server error.

Interner Serverfehler
Der Server hat einen internen Fehler und konnte Ihre Anfrage nicht vervollständigen.
Bitte wende Dich an den Serveradministrator, sollte dieser Fehler mehrfach auftreten, und füge Deiner Anfrage die unten stehenden technischen Details bei.
Weitere Details können im Serverprotokoll gefunden werden.

After several tests and browser restart the user is able to login.

In the logs there could be found:

Jul 19 17:25:15 cloud ownCloud[18048]: {handleLogin} Exception: {"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to \"files\"","Code":0,"Trace":"#0 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1859): OC\\Files\\View->getPathRelativeToFiles('\/')\n#1 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1960): OC\\Files\\View->lockPath('\/', 1)\n#2 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1234): OC\\Files\\View->lockFile('\/yourusername', 1)\n#3 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1281): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage), '', '\/yourusername')\n#4 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(179): OC\\Files\\View->getFileInfo('\/yourusername')\n#5 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(341): OC\\Files\\Node\\Root->get('\/yourusername')\n#6 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/server.php(742): OC\\Files\\Node\\Root->getUserFolder('yourusername')\n#7 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/user.php(170): OC\\Server->getUserFolder('yourusername')\n#8 \/var\/www\/cloud.foobar.com\/www\/lib\/base.php(1082): OC_User::login(*** username and password replaced ***)\n#9 \/var\/www\/cloud.foobar.com\/www\/lib\/base.php(978): OC::tryFormLogin()\n#10 \/var\/www\/cloud.foobar.com\/www\/lib\/base.php(940): OC::handleLogin()\n#11 \/var\/www\/cloud.foobar.com\/www\/index.php(39): OC::handleRequest()\n#12 {main}","File":"\/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php","Line":2027}

Server configuration

Operating system: Debian 8

Web server: Apache 2.4

Database: mysql Ver 14.14 Distrib 5.6.31,

PHP version: PHP 7.0.8-1~dotdeb+8.1 (cli) ( NTS ),

ownCloud version: 9.0.2.2

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

Where did you install ownCloud from: gz-package from download page

Signing status (ownCloud 9.0 and above): failed

Modifications in lib/imap.php are valid. Not yet merged owncloud-archive/apps#2093

Modifications in core/js/tests/specs/coreSpec.js . Increased timeout: #25058

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
    - INVALID_HASH
        - core/js/js.js
        - core/js/tests/specs/coreSpec.js
- user_external
    - INVALID_HASH
        - lib/imap.php

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/js/js.js] => Array
                        (
                            [expected] => 5271cd028eb4c232cc2d535f65f2597207f71708b67318c5251006297b858387aa90f8deb23a565f81e7c77737353d1f84229d70a983deafb25861b47d7f5baf
                            [current] => 22d66716221968912d2a116c1bb9bb8cff5cc3a415b8ba9608987b4998a32853b84882da45331dac6a2308711033049f03f6acab80485abb839ebbcd3fa9668f
                        )

                    [core/js/tests/specs/coreSpec.js] => Array
                        (
                            [expected] => d6e0f0af26fe8513951f394750933bc87ec3bfc564c2cc4fd0a5e0c3c05a78a290856d9b35008547636954738fe068a45b41ee304e0fa369412e5603465abfb8
                            [current] => c0ae140e5ee1a26395aec94b765eea3bdd6898c29369256959cb1550e69dc9e80b5e25a99aa14d157a6b7ff873ec8b9855f3b6516384e2ed478ea60b687a3423
                        )

                )

        )

    [user_external] => Array
        (
            [INVALID_HASH] => Array
                (
                    [lib/imap.php] => Array
                        (
                            [expected] => d4ebccdc4a2f2a97456c666ef6f6608ed631ceaee3f605e270df88be08a1c3e2c3b6944f07a271612bc6fa79b708c0d9a2ee54b310e68255c415f46904665efa
                            [current] => 2b57473d0fb8855b1c4d9d24eb033efb8bf4f62cfaabbcfedf7319f282b79b76bca77664d0847b2bd43964b67db3c51c2dfc5291638931e4cc815fc88f4a3a57
                        )

                )

        )

)

List of activated apps:

Enabled:
  - activity: 2.2.1
  - calendar: 1.2.2
  - comments: 0.2
  - contacts: 1.3.1.0
  - dav: 0.1.6
  - documents: 0.12.0
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - galleryplus: 15.1.0
  - news: 8.8.0
  - notes: 2.0.1
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
  - user_external: 0.4
Disabled:
  - encryption
  - external
  - files_external
  - gallery
  - user_ldap

The content of config/config.php:

<?php
$CONFIG = array (
  'forcessl' => true,
  'logdateformat' => 'Y-m-d H:i:s.u',
  'log_type' => 'syslog',
  'syslog_tag' => 'ownCloud',
  'loglevel' => 0,
  'mail_domain' => 'foobar.com',
  'mail_from_address' => 'foobar-owncloud',
  'mail_smtpmode' => 'php',
  'remember_login_cookie_lifetime' => '1296000',
  'session_keepalive' => true,
  'session_lifetime' => '86400',
  'trashbin_retention_obligation' => 'auto, 15',
  'trusted_proxies' => 
  array (
    0 => '192.168.12.4',
  ),
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'cloud.foobar.com',
  ),
  'datadirectory' => '/var/www/cloud.foobar.com/www/data',
  'overwrite.cli.url' => 'https://cloud.foobar.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '9.0.2.2',
  'dbname' => 'foobar',
  'dbhost' => 'localhost',
  'dbtableprefix' => '',
  'dbuser' => 'foobar',
  'dbpassword' => '12345',
  'logtimezone' => 'UTC',
  'installed' => true,
  'default_language' => 'de',
  'mail_smtpsecure' => 'ssl',
  'user_backends' => 
  array (
    0 => 
    array (
      'class' => 'OC_User_IMAP',
      'arguments' => 
      array (
        0 => '{mail.foobar.com:993/imap/ssl}',
        1 => 'foobar.com',
      ),
    ),
  ),
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'mail_smtphost' => 'mail.foobar.com',
  'mail_smtpport' => '587',
  'theme' => '',
  'maintenance' => false,
  'appstore.experimental.enabled' => false,
);



Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Yes , Imap

Client configuration

Browser: FF47

Operating system: Debian 8

Seems to be related to #20675 - #20675 but redis is working fine

@PVince81
Copy link
Contributor

Did you make changes to js.js ? The integrity check says the file was modified.

Please make sure you are using the correct version.

@PVince81
Copy link
Contributor

Formatted exception for better readability:

Jul 19 17:25:15 cloud ownCloud[18048]: {handleLogin} Exception: {"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to \"files\"","Code":0,"Trace":"
#0 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1859): OC\\Files\\View->getPathRelativeToFiles('\/')\n
#1 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1960): OC\\Files\\View->lockPath('\/', 1)\n
#2 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1234): OC\\Files\\View->lockFile('\/yourusername', 1)\n
#3 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1281): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage), '', '\/yourusername')\n
#4 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(179): OC\\Files\\View->getFileInfo('\/yourusername')\n
#5 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(341): OC\\Files\\Node\\Root->get('\/yourusername')\n
#6 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/server.php(742): OC\\Files\\Node\\Root->getUserFolder('yourusername')\n
#7 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/user.php(170): OC\\Server->getUserFolder('yourusername')\n
#8 \/var\/www\/cloud.foobar.com\/www\/lib\/base.php(1082): OC_User::login(*** username and password replaced ***)\n
#9 \/var\/www\/cloud.foobar.com\/www\/lib\/base.php(978): OC::tryFormLogin()\n
#10 \/var\/www\/cloud.foobar.com\/www\/lib\/base.php(940): OC::handleLogin()\n
#11 \/var\/www\/cloud.foobar.com\/www\/index.php(39): OC::handleRequest()\n
#12 {main}","File":"\/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php","Line":2027}

@PVince81
Copy link
Contributor

Are these new users added to the IMAP backend ?
If you create a non-IMAP user, can that user login ?

Looking at the error I have the feeling that something is meddling with the user's home folder path and putting it in a wrong location, could be the IMAP plugin.

@xshadow
Copy link
Author

xshadow commented Jul 21, 2016

I further investigated this problem.

Seems so that there was an package update for debians php packages. Which removed crucial packages.

After reinstalling all php7 packages, a restart of the webserver and the upgrade to owncloud 9.0.4, the home of a new user from the IMAP backend is created successfully by owncloud.

  - php7.0
  - php-apc
  - php7.0-cgi
  - php7.0-cli
  - php7.0-common
  - php7.0-curl
  - php7.0-gd
  - php7.0-imagick
  - php7.0-imap
  - php7.0-intl
  - php7.0-mcrypt
  - php7.0-mysql
  - php7.0-odbc
  - php7.0-json
  - php7.0-sqlite3
  - php-pear
  - php-xml-parser
  - php7.0-redis
  - php7.0-zip
  - php7.0-xml
  - php7.0-mbstring

@xshadow
Copy link
Author

xshadow commented Jul 22, 2016

This issue is sadly unsolved. It occured again this morning.

Yes these users are created on the imap backend.

OC Version: 9.0.4

Integrity check:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- user_external
    - INVALID_HASH
        - lib/imap.php

Raw output
==========
Array
(
    [user_external] => Array
        (
            [INVALID_HASH] => Array
                (
                    [lib/imap.php] => Array
                        (
                            [expected] => d4ebccdc4a2f2a97456c666ef6f6608ed631ceaee3f605e270df88be08a1c3e2c3b6944f07a271612bc6fa79b708c0d9a2ee54b310e68255c415f46904665efa
                            [current] => 2b57473d0fb8855b1c4d9d24eb033efb8bf4f62cfaabbcfedf7319f282b79b76bca77664d0847b2bd43964b67db3c51c2dfc5291638931e4cc815fc88f4a3a57
                        )

                )

        )

)

Log message from yesterday evening where the new imap user login did not work:

Jul 21 22:13:44 cloud-vmserv ownCloud[1608]: {core} Login failed: 'user@foobar.com' (Remote IP: '0.0.0.0')
Jul 21 22:14:20 cloud-vmserv ownCloud[1606]: {handleLogin} Exception: 
{"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to \"files
\"","Code":0,"Trace":"#0 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1893): OC\\Files
\\View->getPathRelativeToFiles('\/')\n#1 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files
\/view.php(1994): OC\\Files\\View->lockPath('\/', 1)\n#2 \/var\/www\/cloud.foobar.com\/www\/lib\/private
\/files\/view.php(1268): OC\\Files\\View->lockFile('\/user', 1)\n#3 \/var\/www\/cloud.foobar.com\/www\
/lib\/private\/files\/view.php(1315): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage),
 '', '\/user')\n#4 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(179): OC\\Files
\\View->getFileInfo('\/user')\n#5 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(341):
 OC\\Files\\Node\\Root->get('\/user')\n#6 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/server.php(742):
 OC\\Files\\Node\\Root->getUserFolder('user')\n#7 \/var\/www\/cloud.foobar.com\/www\/lib\/private
\/user.php(170): OC\\Server->getUserFolder('user')\n#8 \/var\/www\/cloud.foobar.com\/www\
/lib\/base.php(1107): OC_User::login(*** username and password replaced ***)\n#9 \/var\
/www\/cloud.foobar.com\/www\/lib\/base.php(1003): OC::tryFormLogin()\n#10 \/var\
/www\/cloud.foobar.com\/www\/lib\/base.php(965): OC::handleLogin()\n#11 \/var\/www\/cloud.foobar.com
\/www\/index.php(39): OC::handleRequest()\n#12 {main}","File":"\/var\/www\/cloud.foobar.com\/www\
/lib\/private\/files\/view.php","Line":2061}

Log message from this morning where the imap user creation worked:

Jul 22 09:08:11 cloud-vmserv ownCloud[8394]: {files_skeleton} copying skeleton for user from /var/www
/cloud.foobar.com/www/core/skeleton to /user/files/
Jul 22 09:08:11 cloud-vmserv ownCloud[8394]: {handleLogin} Exception: 
{"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to \"files
\"","Code":0,"Trace":"#0 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/view.php(1893): OC\\Files
\\View->getPathRelativeToFiles('\/')\n#1 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files
\/view.php(1994): OC\\Files\\View->lockPath('\/', 1)\n#2 \/var\/www\/cloud.foobar.com\/www\/lib\/private
\/files\/view.php(1083): OC\\Files\\View->lockFile('\/user\/files\/own...', 1)\n#3 \/var\/www\/cloud.foobar.com
\/www\/lib\/private\/files\/view.php(540): OC\\Files\\View->basicOperation('touch', '\/user\/files\/own...', 
Array, NULL)\n#4 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/folder.php(165): OC\\Files
\\View->touch('\/user\/files\/own...')\n#5 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/util.php(334): 
OC\\Files\\Node\\Folder->newFile('ownCloud Manual...')\n#6 \/var\/www\/cloud.foobar.com\/www\
/lib\/private\/util.php(313): OC_Util::copyr('\/var\/www\/cloud....', Object(OC\\Files\\Node\\Folder))\n#7 \/var\
/www\/cloud.foobar.com\/www\/lib\/private\/files\/node\/root.php(351): OC_Util::copySkeleton('user', 
Object(OC\\Files\\Node\\Folder))\n#8 \/var\/www\/cloud.foobar.com\/www\/lib\/private\/server.php(742): 
OC\\Files\\Node\\Root->getUserFolder('user')\n#9 \/var\/www\/cloud.foobar.com\/www\/lib\/private
\/user.php(170): OC\\Server->getUserFolder('user')\n#10 \/var\/www\/cloud.foobar.com\/www\
/lib\/base.php(1107): OC_User::login(*** username and password replaced ***)\n#11 \/var\
/www\/cloud.foobar.com\/www\/lib\/base.php(1003): OC::tryFormLogin()\n#12 \/var\/www\/cloud.foobar.com
\/www\/lib\/base.php(965): OC::handleLogin()\n#13 \/var\/www\/cloud.foobar.com\/www\/index.php(39): 
OC::handleRequest()\n#14 {main}","File":"\/var\/www\/cloud.foobar.com\/www\/lib\/private\/files
\/view.php","Line":2061}

@xshadow xshadow reopened this Jul 22, 2016
@compuguy
Copy link

I'm having the same error during the upgrade process to 9.1: Remove Shares of a users root folder

@PVince81
Copy link
Contributor

I think I saw this message also when the code tried to create a "File is locked exception" but there was this error when generating the message. So there is also a slight possibility that the file/folder is locked for some reason.

@PVince81
Copy link
Contributor

I also see in the integrity check that the file "lib/imap.php" has been modified. Did you modify it ? It could also be a failed update.

@xshadow
Copy link
Author

xshadow commented Sep 25, 2016

Modifications in lib/imap.php are valid. Not yet merged owncloud-archive/apps#2093

@PVince81
Copy link
Contributor

Any more luck with 9.0.7 or 9.1.3 ? (the IMAP changes were merged already)

@PVince81
Copy link
Contributor

PVince81 commented Apr 6, 2017

Please try again with 9.0.8, 9.1.4 (or 9.0.9 RC1 or 9.1.5 RC1)

@PVince81 PVince81 closed this as completed Apr 6, 2017
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label needs info is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.

@enric1994
Copy link

hey! I experimented the "/files_external" must be relative to "files" message when accessing the market.
To solve it I stoped the onlyoffice container.

@lock
Copy link

lock bot commented Jul 31, 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 Jul 31, 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

5 participants