[horde] Where does gollem store the uploaded files?

Frank Lienhard frank at mclien.de
Sat Nov 19 16:14:00 UTC 2016



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?

Anyway, If I change this to a file-based method, should I firstly delete
all uploads to get the database cleared?

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)
'root' : ? (the webusers home-dir?)
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?


Let me know, if I missed/misunderstood something

thanks



More information about the horde mailing list