# Disable the Finder module (according to the user ?) and change the way the Assets module works

**URL:** <https://discourse.getcockpit.com/t/disable-the-finder-module-according-to-the-user-and-change-the-way-the-assets-module-works/1999>\
**Category:** Feature Request\
**Created:** [July 13, 2021, 11:34am UTC](https://discourse.getcockpit.com/t/disable-the-finder-module-according-to-the-user-and-change-the-way-the-assets-module-works/1999 "2021-07-13T11:34:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcTabaries](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/marctabaries/32/867_2.png) [@MarcTabaries](https://discourse.getcockpit.com/u/MarcTabaries)\
**Post date:** [July 13, 2021, 11:34am UTC](https://discourse.getcockpit.com/t/disable-the-finder-module-according-to-the-user-and-change-the-way-the-assets-module-works/1999/1 "2021-07-13T11:34:45Z")

</div>

Hi,

I take the liberty of posting a message because I have two questions regarding the Assets module and the Finder module. I can’t find an answer in the official Cockpit documentation.

If I understood correctly, the Finder module allows you to browse all the folders and files in Cockpit. The Assets module is actually a simplification of the Finder module which only gives access to files stored in /storage/uploads

1 / Is it possible to deactivate the Finder module and only use the Assets module? In the majority of cases, it is not necessary to have access to all Cockpit folders / files directly from Cockpit. Moreover, if an average user uses the Finder module, instead of the Assets module, and deletes an important file / folder for the functioning of Cockpit the application will be down.

2 / Is it possible to change the way the folders / files are stored? Currently, when a file is imported into Cockpit via the Assets module, it is stored in this way on the server:

`/storage/uploads/year/month/day/filename.jpg`

If we decide to create an Images folder, in the Assets module, and try to import a file into that Images folder … it will actually be stored on the server in the same location.

`/storage/uploads/year/month/day/filename.jpg`

The folders created in the Assets module are therefore virtual. It would be simpler and more logical for the Assets module to store files in this form:

`/storage/uploads/filename.jpg`

Or if you want to use an intermediate Images folder

`/storage/uploads/images/filename.jpg`

In my opinion, it makes no sense that files are stored as year, month, and day. Especially knowing that the Finder module does not work like that. Indeed, when a folder is created via the Finder module, the folder in question is actually created on the server.

Clearly, I really like the interface of the Assets module which is simpler than the Finder module, especially for an average user … but the way files are stored through this module doesn’t seem logical. Looks like the Assets module works like WordPress at this level … whereas Cockpit is not basically a blogging system. Besides, even for a blogging system, I can’t find this way of storing files relevant.

The other problem I see is later when we want to access the files stored on the server from the API-REST … it is easier to say to go and look for the files in /storage/uploads/images, rather than in /storage/uploads/2021/07/13, especially since it is very difficult to remember which file we uploaded and on what date.

What do you think ?

---

<div class="post-metadata">

**Author:** ![abernh](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/abernh/32/859_2.png) [@abernh](https://discourse.getcockpit.com/u/abernh)\
**Post date:** [July 14, 2021, 11:57am UTC](https://discourse.getcockpit.com/t/disable-the-finder-module-according-to-the-user-and-change-the-way-the-assets-module-works/1999/2 "2021-07-14T11:57:20Z")

</div>

> [@MarcTabaries](#):
>
> 1 / Is it possible to deactivate the Finder module and only use the Assets module? In the majority of cases, it is not necessary to have access to all Cockpit folders / files directly from Cockpit. Moreover, if an average user uses the Finder module, instead of the Assets module, and deletes an important file / folder for the functioning of Cockpit the application will be down.

You can [define user-group permissions in your `config.php`](https://discourse.getcockpit.com/t/where-to-create-user-groups/1182/7). To disable the ‘finder’ module for a group use

```auto
{
  groups: {
    noFinderUsers: { // your groups name
      cockpit: {
        finder: false
      }
    }
  }
}

```

> [@MarcTabaries](#):
>
> 2 / Is it possible to change the way the folders / files are stored? Currently, when a file is imported into Cockpit via the Assets module, it is stored in this way on the server:

Currently not. This is hardcoded in the assets module

> <https://github.com/agentejo/cockpit/blob/30f090dd4b3c3a1153afdf6a849543c62229b5e4/modules/Cockpit/module/assets.php#L42>
