You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an folder shared for other users. If i log in with one of the other accounts, add and share a folder inside the shared folder as link, there comes just a message for a broken link.
Hi,
I have the same behaviour.
resharing public links is no longer possible, I can't tell when it stopped working...
Steps to reproduce
Create a Folder and Share it to a group.
Login with a User in this group, create a new file/folder in the shared folder and reshare with a public link
Expected behaviour
the reshared file should be shown
Actual behaviour
It appears a Owncloud Error for a broken link:
Sorry, this link doesn’t seem to work anymore.
Reasons might be:
the item was removed
the link expired
sharing is disabled
For more info, please ask the person who sent this link.
Server configuration
Operating system:
Ubuntu 14.04 Web server:
NGINX 1.4.6 Database:
Mysql PHP version:
PHP 5.5.x ownCloud version: (see ownCloud admin page)
Owncloud 7.0.4 Updated from an older ownCloud or fresh install:
Update from 7.0.3 List of activated apps:
Activity, Deleted Files, PDF, Pictures, Share Files, Video Viewer The content of config/config.php:
I have to bring this up again.
I noticed that when I reshare a file and look at "Shared by Link" I see the shared file but the link is wrong.
For a normal "Shared by link" file the link looks like:
after ?dir= there is added the string "files" if I copy the link and delete this string I get the correct download prompt.
Otherwise I only get to see the error "file not found" maybe a wrong link is also the problem for the public shared link?
The link you posted is not a link share.
You should use the link that appears in the share dropdown under the "Share link" checkbox.
It contains "public.php" and a token argument.
Still, does it mean that regular file download doesn't work for you for reshared files ? (regardless of public link)
This Link is broken and leads to a error website: Sorry, this link doesn’t seem to work anymore.
2nd Problem:
Every file shared by public link also shows up in the Section "Shared by Link" for the logged in User.
In this section the file is displayed but the link is also broken, it shows error page file not found
Okay I see. Is the domain name always the same for the shared files, including the public link ?
Can you check the database entry matching the share ?
You can find it with select * from oc_share where token='5a1f2d0859c5c0eab05b95f2e7748194' then post the result here.
Also take the share id and check select * from oc_filecache where fileid=1234 (where 1234 is the share id from the call above).
I suspect that the share entry does exist, else you wouldn't see it in the "Shared with link" section. But somehow reading it from the public page still fails.
I noticed that I can solve my problem by simply unsharing a folder (for every group) and then share the folder to all groups again. After that I can reshare files again?
So unless you have any other idea what is wrong I think I login with my "Share Users" and do this for all my groupshares?
Same problem here. It seems after the update to 7.0.4 only the owner of a shared folder can create a public link that works. Public links of members of the group the folder is shared to get a 404.
A guess:
I looked at the oc_share table and as in Do-Ds example above, the parent column is NULL, whereas with previous entries it contained the id for a shared parent folder (I think). And since OCP\Share::resolveReShare requires a parent, it's not working.
/public.php includes /apps/files_sharing/public.php. An excerpt with comments:
if (isset($_GET['t'])) {
$token = $_GET['t'];
$linkItem = OCP\Share::getShareByToken($token, false);
if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
//// $linkItems is set and contains the creator of the public share as uid_owner. So far so good.
// seems to be a valid share
$type = $linkItem['item_type'];
$fileSource = $linkItem['file_source'];
$shareOwner = $linkItem['uid_owner'];
$path = null;
$rootLinkItem = OCP\Share::resolveReShare($linkItem);
//// resolveReShare() seems to walk up the tree along the parents until it finds the owner of the shared folder. But $rootLinkItem's uid_owner is still the same as in $linkItem, because parent is NULL.
if (isset($rootLinkItem['uid_owner'])) {
OCP\JSON::checkUserExists($rootLinkItem['uid_owner']);
OC_Util::tearDownFS();
OC_Util::setupFS($rootLinkItem['uid_owner']);
$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
//// getPath() now returns the right path for me (owner of shared folder) but nothing for the other person, since maybe OC_Util::setupFS sets up the filesystem differently for the two users.
}
}
}
If this goes in the right direction, the question is, why is the parent in oc_share suddenly null. I'll try unsharing and resharing the folders after a backup.
👍
Overwriting /lib/private/share/share.php with the version from #13470 solved the issue for me. After de-selecting "Share link" and selecting it again everything worked. Thx!
Activity
karlitschek commentedon Dec 12, 2014
@schiesbn
PVince81 commentedon Dec 18, 2014
@Pfeifakopf please use the issue template: https://raw.github.com/owncloud/core/master/issue_template.md
Do-D commentedon Jan 2, 2015
Hi,
I have the same behaviour.
resharing public links is no longer possible, I can't tell when it stopped working...
Steps to reproduce
Expected behaviour
the reshared file should be shown
Actual behaviour
It appears a Owncloud Error for a broken link:
Server configuration
Operating system:
Ubuntu 14.04
Web server:
NGINX 1.4.6
Database:
Mysql
PHP version:
PHP 5.5.x
ownCloud version: (see ownCloud admin page)
Owncloud 7.0.4
Updated from an older ownCloud or fresh install:
Update from 7.0.3
List of activated apps:
Activity, Deleted Files, PDF, Pictures, Share Files, Video Viewer
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
NO
Are you using encryption: yes/no
NO
Client configuration
Browser:
FF, IE
Operating system:
Logs
Web server error log
ownCloud log (data/owncloud.log)
only if I choose DEBUG
Browser log
Do-D commentedon Jan 5, 2015
I have to bring this up again.
I noticed that when I reshare a file and look at "Shared by Link" I see the shared file but the link is wrong.
For a normal "Shared by link" file the link looks like:
for a reshared file it looks like this
after ?dir= there is added the string "files" if I copy the link and delete this string I get the correct download prompt.
Otherwise I only get to see the error "file not found" maybe a wrong link is also the problem for the public shared link?
Any help is appreciated!
PVince81 commentedon Jan 7, 2015
The link you posted is not a link share.
You should use the link that appears in the share dropdown under the "Share link" checkbox.
It contains "public.php" and a token argument.
Still, does it mean that regular file download doesn't work for you for reshared files ? (regardless of public link)
Do-D commentedon Jan 7, 2015
Let me try to clear the question
1st Problem:
After Uploading a file test.zip in a shared folder /test I reshare the file and create a public link:
This Link is broken and leads to a error website: Sorry, this link doesn’t seem to work anymore.
2nd Problem:
Every file shared by public link also shows up in the Section "Shared by Link" for the logged in User.
In this section the file is displayed but the link is also broken, it shows error page file not found
In this example the folder test is a shared folder in which I uploaded the file test.zip.
But If I navigate manually (Section "All Files") in the shared folder test/ I can download the file test.zip and the link looks like this:
Both problems ONLY happen for reshared files, not for files stored in the users home directory!
PVince81 commentedon Jan 7, 2015
Okay I see. Is the domain name always the same for the shared files, including the public link ?
Can you check the database entry matching the share ?
You can find it with
select * from oc_share where token='5a1f2d0859c5c0eab05b95f2e7748194'then post the result here.Also take the share id and check
select * from oc_filecache where fileid=1234(where 1234 is the share id from the call above).I suspect that the share entry does exist, else you wouldn't see it in the "Shared with link" section. But somehow reading it from the public page still fails.
Do-D commentedon Jan 8, 2015
Yes the domain name is always the same and correct.
For the test, I created a new public link therefore it has a new token:
https://xx.xx.at/public.php?service=files&t=8fe100661df9d15aac13fe2f879ee037
With Share ID you mean the item source 4037 from above?
I noticed that I can solve my problem by simply unsharing a folder (for every group) and then share the folder to all groups again. After that I can reshare files again?
So unless you have any other idea what is wrong I think I login with my "Share Users" and do this for all my groupshares?
PVince81 commentedon Jan 8, 2015
@schiesbn any clues ? Does that sound like of the known issues ?
simne7 commentedon Jan 9, 2015
I noticed the same issue after updating from 7.0.2. to 7.0.4 (via Updater). But I don't know if it results form the update.
working link from files app
https://xx.xx.de/index.php/apps/files/ajax/download.php?dir=%2Fpath%2Fto%2Ffolder&files=file.zip
link from "shared by link" (broken)
https://xx.xx.de/index.php/apps/files/ajax/download.php?dir=files%2Fpath%2Fto%2Ffolder&files=file.zip
As you notice the second link contains dir=files%2F as the only difference to the working link. May this be the reason for the broken sharing link (the one with the token, e.g. https://xx.xx.de/public.php?service=files&t=a45c399002as4df60560bd786f4ed4f1)?
combatwombat commentedon Jan 13, 2015
Same problem here. It seems after the update to 7.0.4 only the owner of a shared folder can create a public link that works. Public links of members of the group the folder is shared to get a 404.
A guess:
I looked at the oc_share table and as in Do-Ds example above, the parent column is NULL, whereas with previous entries it contained the id for a shared parent folder (I think). And since OCP\Share::resolveReShare requires a parent, it's not working.
/public.phpincludes/apps/files_sharing/public.php. An excerpt with comments:If this goes in the right direction, the question is, why is the parent in oc_share suddenly null. I'll try unsharing and resharing the folders after a backup.
PVince81 commentedon Jan 27, 2015
Very likely to be a duplicate of #13361
Can you guys try with the following patch: #13470
You'll need to delete then re-create the public reshare.
After the fix the "parent" field should not be null any more.
simne7 commentedon Jan 28, 2015
👍
Overwriting /lib/private/share/share.php with the version from #13470 solved the issue for me. After de-selecting "Share link" and selecting it again everything worked. Thx!
PVince81 commentedon Jan 28, 2015
Thanks a lot @simne7
@Pfeifakopf @Do-D @combatwombat how about you guys ?
Do-D commentedon Jan 28, 2015
Hi,
deleting and re-creating the share did work for me too.
Thanks!
PVince81 commentedon Jan 28, 2015
Thanks. I'm going to close this ticket then.
@Pfeifakopf @combatwombat if after applying the patch and recreating the share you still get issues, feel free to reopen.