[horde] Where does gollem store the uploaded files?

Arjen de Korte arjen+horde at de-korte.org
Sat Nov 19 19:37:07 UTC 2016


Citeren Frank Lienhard <frank at mclien.de>:

> On 11/19/2016 05:28 PM, Michael J Rubinsky wrote:
>>
>> Quoting Frank Lienhard <frank at mclien.de>:
>>
>>> On 11/19/2016 04:51 PM, Michael J Rubinsky wrote:
>>>>
>>>> Quoting Frank Lienhard <frank at mclien.de>:
>>>>
>>>>> On 11/19/2016 03:51 PM, Luis Felipe Marzagao wrote:
>>>>>>
>>>>>>
>>>>>> Em 19/11/2016 12:46, Frank Lienhard escreveu:
>>>>>>> I'd like to keep track (via cron) when the files uploaded with gollem
>>>>>>> use a certain amount of space, to then automaticly delete the oldest
>>>>>>> files.
>>>>>>>
>>>>>>> But I don't have any clue where gollem stores these files.
>>>>>>
>>>>>> Depends on your backend system. What does your
>>>>>> gollem/config/backends.local.php say?
>>>>> Nothing, because there is only an
>>>>> gollem/config/backends.d/10-groupware.php
>>>>> which is the default and says this:
>>>>> ---------------
>>>>> <?php
>>>>> $backends['ftp']['disabled'] = true;
>>>>> $backends['sqlhome']['disabled'] = false;
>>>>> $backends['sqlhome']['name'] = 'Home';
>>>>> ---------------------
>>>>>
>>>>> So if I understand the example in gollem/config/backends.php correctly:
>>>>>  *   - home: (string) The directory that will be used as home directory
>>>>> for the
>>>>>  *           user. This parameter will overrule a home parameter in the
>>>>> params.
>>>>>  *           If empty, this will default to the active working
>>>>> directory
>>>>>  *           immediately after logging into the VFS backend (i.e. for
>>>>> ftp,
>>>>>  *           this will most likely be ~user, for SQL based VFS
>>>>> backends,
>>>>>  *           this will probably be the root directory).
>>>>>
>>>>> this means it is stored in a vfs (Virtual File System of SQL)?
>>>>>
>>>>> That would be I simply can't find it on file system level?
>>>>
>>>> Correct, these settings connect to the SQL based VFS (normally stored in
>>>> the horde_vfs table).
>>>>
>>> OK, I'm not a DB expert, but when I think of uploading pictures or such,
>>> isn't that a bit overkill and resource-consuming?
>>
>> Yes, it is. However, it's the only backend guaranteed to work out of the
>> box - without making assumptions about directory structures etc... This
>> is why it's the default when installing via the Groupware Bundles - a
>> bundle designed to be an easy out of the box solution for people not
>> wanting to install and configure each application separately.
>>
>>> Anyway, If I change this to a file-based method, should I firstly delete
>>> all uploads to get the database cleared?
>>
>> If your users don't need them, sure.
>>
>>> In my case I think I should use this backend then?:
>>> -----------------------------------------------------------------
>>> // NOTE: /exampledir/home and all subdirectories should be, for
>>> // security reasons, owned by your web server user and mode 700 or you
>>> // will need to use suexec or something else that can adjust the web
>>> // server effective uid.
>>> $backends['file'] = array(
>>>     // Disabled by default
>>>     'disabled' => true,
>>>     'name' => 'Virtual Home Directories',
>>>     'driver' => 'file',
>>>     'hordeauth' => true,
>>>     'params' => array(
>>>         // The base location under which the user home directories live.
>>>         'vfsroot' => '/exampledir/home/',
>>>         // The default permissions to set for newly created folders and
>>> files.
>>>         // 'permissions' => '750'
>>>     ),
>>>     'loginparams' => array(),
>>>     'root' => '/',
>>>     'home' => $GLOBALS['registry']->getAuth(),
>>>     // 'createhome' => false,
>>>     // 'filter' => '^regex$',
>>>     // 'quota' => false,
>>>     'shares' => true,
>>>     'attributes' => array(
>>>         'type',
>>>         'name',
>>>         'share',
>>>         'edit',
>>>         'download',
>>>         'modified',
>>>         'size',
>>>     )
>>> );
>>> ----------------------------------------------------------
>>> As I'm on a shared hosting, I guess I need to set some parameters
>>> correctly.
>>> 'vfsroot':  gollem/files (where files need to be 700)
>>
>>
>> This should probably be a fully qualified path. Also, this would put
>> your VFS under the gollem directory. Not sure if that's what you want or
>> not. Most likely you'd want a separate path for your vfs if possible.
>>
>>> 'root' : ? (the webusers home-dir?)
>>
>> This is explained in the top of backends.php.
>>
>>> uncomment // 'createhome' => false, (since I do that manually)
>>>
>>> Do I need to to something with the 'home' line depending on what auth
>>> system I use?
>>
>> $registry->getAuth() returns the current username (regardless of auth
>> backend), so it is used as the directory name of the user's home directory.
>>
>>
> I clearly got something wrong:
> backends.local.php:
> ---------------------------------
> <?php
> // NOTE: /exampledir/home and all subdirectories should be, for
> // security reasons, owned by your web server user and mode 700 or you
> // will need to use suexec or something else that can adjust the web
> // server effective uid.
> $backends['file'] = array(
>     // Disabled by default
>     'disabled' => false,
>     'name' => 'Share',
>     'driver' => 'file',
>     'hordeauth' => true,
>     'params' => array(
>         // The base location under which the user home directories live.
>         'vfsroot' => '/var/www/virtual/user/html/horde/_exchange/alle/',
>         // The default permissions to set for newly created folders and
> files.
>         // 'permissions' => '750'
>     ),
>     'loginparams' => array(),
>     'root' => '/var/www/virtual/user/html/horde/_exchange/',
>     'home' => $GLOBALS['registry']->getAuth(),
>     'createhome' => false,
>     // 'filter' => '^regex$',
>     // 'quota' => false,
>     'shares' => true,
>     'attributes' => array(
>         'type',
>         'name',
>         'share',
>         'edit',
>         'download',
>         'modified',
>         'size',
>     )
> );
> -----------------------------
> leads to this filesystem path for user dau:
> /var/www/virtual/user/html/horde/_exchange/alle/var/www/virtual/user/html/horde/_exchange/dau
>
> maybe a fully qualified path for vfsroot is not correct?

No, your 'root' should be empty and you probably need to lose the  
'alle' part from your 'vfsroot'. See the comment in the header of  
'gollem/config/backend.php'.



More information about the horde mailing list