# uname -a

Switch

Mot-clé -

Fil des billets

lundi 9 novembre 2015

Owncloud : batch set calendar events to "CONFIDENTIAL"

You are sharing your owncloud calendar with others. Good.

You don’t want others to see the details of your events, you only want to share the fact that your are “not available”, so you set the event to “CONFIDENTIAL”.

By default, Owncloud sets the events to “PUBLIC” (visible by anyone who have read access).

How to change all the default public events to “CONFIDENTIAL” ? Here is how.

Lire la suite...

jeudi 5 décembre 2013

Way to the cloud : Sync directly all your Android contacts to OwnCloud without using bluetooth, memory card, or Google servers

It’s the first time I have an Android phone. I thougth that years of Android development was going to offer me anything I want. I thought that all the people concerned by their privacy on their phone have already provided workarounds to flee Google servers. I was wrong.

Some days ago, I wanted to sync all my contacts to my OwnCloud server.

After a few researches, I found that I could use the CardDAV facilities from OwnCloud to sync my contacts to my phone, via an application. Great ! But how can I send my existing contacts to OwnCloud ?

Android separates the intern contacts and the “synced” contacts and I couldn’t find the command to say “hey, copy all the existing contacts for syncing”. I couldn’t use bluetooth to send my contacts because my computer does not have a bluetooth adaptator. I don’t have a memory card to transfer all my contacts. I can’t figure out how to dump the contacts from the phone via USB. I don’t want to sync to Google to be able to download all my contacts and send them back to OwnCloud.

Argh, why is it so complicated to sync my existing contacts to OwnCloud ?

Here is how I did it.

Lire la suite...

jeudi 17 mai 2012

Owncloud : could not calculate folder size

I recently installed Owncloud, and I already had some problems in order to make it run.

I finally managed to make it run, but I ran into an other problem today.

I tried to upload (with SSH, not with the web interface) my music collection that is bigger than 2Go, and I got the following error :

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[22003]: Numeric value out of range: 7 ERREUR:  la valeur « 2857678756 » est en dehors des limites du type integer' in /home/.../public_html/lib/db.php:527
Stack trace:
#0 /home/.../public_html/lib/db.php(527): PDOStatement->execute(Array)
#1 /home/.../public_html/lib/filestorage/local.php(326): PDOStatementWrapper->execute(Array)
#2 /home/.../public_html/lib/filestorage/local.php(295): OC_Filestorage_Local->calculateFolderSize('mathieu/files/M...')
#3 /home/.../public_html/lib/filestorage/local.php(47): OC_Filestorage_Local->getFolderSize('mathieu/files/M...')
#4 /home/.../public_html/lib/filesystem.php(573): OC_Filestorage_Local->filesize('mathieu/files/M...')
#5 /home/.../public_html/lib/filesystem.php(346): OC_Filesystem::basicOperation('filesize', '/Musique')
#6 /home/.../public_html/lib/files.php(54): OC_Filesystem::filesize('/Musique')
#7 /home/.../public_html/files/index.php(48): OC in /home/.../public_html/lib/db.php on line 527

It seemed that the Owncloud developers haven’t thought about the weird guy who had more than 2Go of Music. I changed the size of the column from integer to bigint in the PostgreSQL database (I had configured Owncloud with PostgreSQL), and the problem vanished :

ALTER TABLE foldersize ALTER size TYPE bigint ;

I hope it will help those who are stuck with this problem. I will also check if the problem is a known bug, and if it is not, I will declare it in the Owncloud bug tracker.

Thinking about it, maybe the “reasonnable” solution would be to change the value to an “unsigned int”, but it will limit the folders size to 4Go, and the problem could appear again.

EDIT : it is a known and fixed bug (in next version) : http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-296

jeudi 10 mai 2012

Owncloud : fresh install redirects https to http and cannot login

I have just installed the 3.0.3 version of Owncloud on a test server, to see if I can use it to “cloudify” some of my files, and I ran into an error that was not documented. After unsuccessful searches, I looked into the code and I finally figured out what was wrong.

When I tried to log in, or when I was logged if I try to modify any of the params in the web interface, the action failed silently, and the Apache logs showed 302 redirections from the page I was trying to access via POST to an other page.

Actually Owncloud uses the superglobal $_SERVER[‘HTTPS’] to guess if HTTPS is enabled. And on my webserver, maybe because I use suPHP and CGI, the $_SERVER[‘HTTPS’] was empty. So when Owncloud tried to check the referer for my POST request, it failed because it considered it was running with HTTP.

Fortunately, there is a simple workaround, as explained here : http://stackoverflow.com/a/6426731.

The key is to add the keywords “SetEnv HTTPS On” in the VirtualHost that is supposed to provide HTTPS, so that PHP could give the application the right information about SSL support.

I hope it will help those who are stuck with this error.

 

Update : I saw that this post have been referenced by a defect on the Owncloud bug tracker. In my opinion the SSL problem described here is the same in the Defect, and it’s not a Owncloud bug, it’s an Apache and/or PHP miscomprehension and/or misconfiguration problem that lead it to not giving the right informations to PHP.

I thought it was a bug, but thinking about how Owncloud handles the SSL information, and thinking about the possible reverse-proxy architecture, it it is probably not. Using $_SERVER[‘HTTPS’] is the right way to do it, Apache should be aware of SSL and give the information to PHP.

Maybe it’s a bad handling of CGI in my Debian and/or Apache and/or suPHP version.