[Owncloud] Fwd: ownCloud 4.5 beta 4

Duarte Velez Grilo me at duarte.vg
Fri Sep 21 14:09:15 UTC 2012


Ok, found the bug! Read below...

2012/9/21 Bjoern Schiessle <schiessle at owncloud.com>:
> On Fri, 21 Sep 2012 13:00:07 +0100 Duarte Velez Grilo wrote:
>> I just checked the permissions, and they are like yours. I started
>> looking at the code, and I think the error happens in
>> /home/[username]/[owncloud_domain.com]/apps/files_external/lib/webdav.php,
>> on line 129, function fopen. I tried to find out how to execute this
>> from the command line, but Google wasn't able to help me. Does anyone
>> know how to execute a function from a php file, using the CLI?
>
> You can use curl from the command line (curl https://www.box.com
> --cacert /path/to/rootcerts.cert). You can also try it without a cacert
> path, but this only works if the certs are installed system wide.
>
> But your error code (77) appears exactly in one case: If the file you
> point to is not readable by curl. You would already get a different
> error if the path to the cert file would be wrong.
>
> Even if I don't know why this should be necessary, but have you tried to
> give broader rights to the file and to the directories above?
>
> That the error appears in fopen() is only, because that's the first
> function called to access the webdav server. Looking at the error I
> don't think that there is a bug in fopen.
>
> cheers,
> Björn

Ok, so I tried giving broader rights, but that still didn't do it. I
then googled more about curl and certificates, trying that command on
the cli with some other variations, and eventually decided to look at
the rootcerts.crt file, because it was the only thing left and things
did point to that. I noticed that the "END CERTIFICATE" and the next
"BEGIN CERTIFICATE" (for the second file) were on the same line. This
indeed looked wrong, so I just added a line break, separating the two.
Lo and behold, the error is no more!

I then removed the webdav configuration and re-added it, just to make
sure. The mounted folder still appears empty, but at least there
aren't any errors.

So, the bug is when importing the certificates: the resulting
rootcerts.crt file should have the certificates appended with a line
break after "-----END CERTIFICATE-----". Unfortunately, I don't know
where this is done, but I'm sure someone can take this and push a fix?
;-)

Thank you, Björn, for the much needed help and hints!

Duarte



More information about the Owncloud mailing list