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

Cloud not found #2973

Closed
hepaly opened this issue Apr 17, 2013 · 19 comments · Fixed by #3457
Closed

Cloud not found #2973

hepaly opened this issue Apr 17, 2013 · 19 comments · Fixed by #3457

Comments

@hepaly
Copy link

hepaly commented Apr 17, 2013

Hi guys, I have an intresting bug. I can not open the shared link (which has shared by another user in my cloud) if I logged in OC. -> Cloud not found
If I logoff, then I can open it.
Screens:
https://dl.dropboxusercontent.com/u/3104528/pi/oc_bug1_doesnt_work_if_login.png
https://dl.dropboxusercontent.com/u/3104528/pi/oc_bug1_works_when_logoff.png

OC:5.0.4
hw:cubieboard with linaro ubuntu server
php_5.4.6

(OC 4.5.9 is working well!)

@ghost ghost assigned MTGap Apr 17, 2013
@BernhardPosselt
Copy link
Contributor

@MTGap

@schiessle
Copy link
Contributor

I can reproduce the bug. It seems like setupFS()[1] doesn't work if a file system is already set up which is the case if the user is already logged in.

I tried to replace "OC_Util::setupFS($fileOwner);" with "OC\Files\Filesystem::initMountPoints($fileOwner);" but this also doesn't solve the problem. @icewind1991 any idea what's the best solution here?

[1] https://github.com/owncloud/core/blob/master/apps/files_sharing/public.php#L42

@Contex
Copy link

Contex commented May 21, 2013

I'm currently having the exact same issue, the public link returns a 200 if the user is logged out, while if they're logged in; it will return a 404.

Expected behaviour

Users should be able to view the shared public links without having to logout.

Actual behaviour

Generates an error instead, "Cloud not found".

Steps to reproduce

  1. Share public link
  2. Open shared link while being logged in -> unable to view
  3. Logout
  4. Open shared link after logging out -> can view the link

Server configuration

Operating system: Debian GNU/Linux 6.0, 2.6.32-5-amd64 x86_64 GNU/Linux

Web server: nginx/1.2.7

Database: mysql Ver 14.14 Distrib 5.1.66, for debian-linux-gnu (x86_64) using readline 6.1

PHP version: PHP 5.3.23-1~dotdeb.0 with Suhosin-Patch (cli) (built: Mar 25 2013 18:06:57)

ownCloud version: 5.0.6

Client configuration

Browser: Any

Operating system: Any

Logs

Web server error log

x - - [21/May/2013:19:34:21 +0000] "GET /public.php?service=files&t=68fe55d5dcf7eef37d15015ae30d864d HTTP/1.1" 404 697 "-" "Mozilla/5.0 (Windows NT 6.1;WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31"

@Contex
Copy link

Contex commented May 21, 2013

Not sure how I would debug it further, but https://github.com/owncloud/core/blob/master/apps/files_sharing/public.php#L50, the $path variable is empty, however the file_source links to the correct ID.

@MTGap
Copy link
Contributor

MTGap commented May 22, 2013

I can't reproduce with stable5. This seems to be temperamental and people are saying different things.

@Contex are you saying the same user or a different user? The original report says a different user is logged in trying to access the link.

@schiesbn I think it's up to you, because I've tried every case over and over.

@MTGap
Copy link
Contributor

MTGap commented May 22, 2013

There's also this weird one: #3097 Last comment says it happens in 5.0.6 as well.

Another: #3014

I can't reproduce any of them.

@Contex
Copy link

Contex commented May 22, 2013

@MTGap
User A is logged in and shares via link.
User B is another user that is logged in.
User C is a visitor, which is not logged in.

User A shares the link with User B, User B is unable to view the shared link and gets a "Cloud not found".
User A shares the link with User C, User C is able to view the shared link.
User B logs out and opens the shared link again and is now able to view the shared link.

I was debugging it a bit yesterday but didn't have that much time, I'll try again later today.

@gerardstanczak
Copy link

I can confirm this happens in 5.0.6, just like user @Contex above mentioned
PHP 5.4.15, CentOS, MySQL backend,

@Happyfeet01
Copy link

@MTGap when i create an Link, and open this link as already logged in, i can see the Files. But when i log out. i became the Error "Cloud not found"

@MTGap
Copy link
Contributor

MTGap commented May 22, 2013

Everyone is saying something different...

@Contex
Copy link

Contex commented May 22, 2013

@MTGap I can link you to my ownCloud installation and give you ssh if needed, if you wish to debug.

@MTGap
Copy link
Contributor

MTGap commented May 22, 2013

I can only reproduce the case with another user logged in on the demo. Not on my installs.

@hepaly
Copy link
Author

hepaly commented May 22, 2013

Here is a short demo for reproduce:
https://dl.dropboxusercontent.com/u/3104528/cloud_bug.mp4

@hepaly hepaly closed this as completed May 22, 2013
@hepaly hepaly reopened this May 22, 2013
@hepaly
Copy link
Author

hepaly commented May 22, 2013

sorry :)

@Happyfeet01
Copy link

Okay i have try to reproduce.
I have shared an JPG Image https://owncloud.speicherwoelkchen.de/public.php?service=files&t=4e52339a9c2a482935c95ef605f25ef1
and an Folder https://owncloud.speicherwoelkchen.de/public.php?service=files&t=d63682c1cf464846210fce367c5a4a38

its not possible to open the Image file (Cloud not Found), but it is possible to access the shared folder. with an Picture inside.

When an file is inside of an Folder and you share only one file inside this folder, its possible to access this file.
https://owncloud.speicherwoelkchen.de/public.php?service=files&t=86ec3ae3620120e31d7076888e296575

the knowledge of this error:

sharing of folders and files inside of folders works, but sharing files at the root directory at /data/Username/files dont work.

sorry for my bad english :-) but i hope you understand what i mean......

@hepaly
Copy link
Author

hepaly commented May 22, 2013

Thanks your work! I patched the:
/apps/files_sharing/public.php
cron.php
lib/files/filesystem.php
lib/files/cache/updater.php
files in OC5.0.6, and working well! :)

@redhandpl
Copy link

@hepaly What did you changed in:
lib/files/filesystem.php
lib/files/cache/updater.php

?

@hepaly
Copy link
Author

hepaly commented May 23, 2013

@redhandpl I'm using the stable OC5, and I patched those files by this link:
#3457
(backported: 412f096)
I'm a novice, please fix me, if it is wrong way :) thx

@Happyfeet01
Copy link

reopen this issue, itś not complete fixed. look here @hepaly @redhandpl @MTGap #3457

@lock lock bot locked as resolved and limited conversation to collaborators Aug 23, 2019
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.

8 participants