Table of Contents

OwnCloud

Avatars

Avatars are stored in /var/www/owncloud/data/avatars/<AA>/<BB>/<CCCCCCCCCCCCCCCCCCCCCCCCCC> where <AA><BB><CC..> are hex values calculated from MD5 hash made from user name. To replace user avatar:

$ echo -n jankowalski | md5sum
ffac53b880657b1df520c6478ffeb1d2
 
cd /var/www/owncloud/data/avatars/ff/ac/53b880657b1df520c6478ffeb1d2
cp ?/newavatar.jpg avatar.jpg
chown www-data.www-data avatar.jpg

Then try to open avatar file using link: https://my.oc.com/avatar/jankowalski/32 to get 32×32 avatar.

Redis

Optional remove and purge PHP-APCU module. However OC docs recommends to keep it for local memcache, because it is faster than Redis.

sudo phpdismod apcu && sudo apt-get purge php-apcu -y
sudo apt-get install redis-server php-redis
sudo phpenmod redis
 
# restart PHP: php-fpm / Apache / Nginx
 
# Test module
php --ri redis
 
redis-server -v
| config.php
'memcache.local' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
  'host' => 'localhost',
  'port' => 6379,
  'timeout' => 0,
  'dbindex' => 0,
),