A folder for all shared files (defined per user)

Hello,

I have a quite simple questions, but found no answer anywhere.
Situation (nextcloud 11.0.2 (stable)): Per standard definition every shared folder is put in the top folder of every one the folder is shared with. This can fast become quite confusing as new folders start to pop up in the main directory if somebody shares something new with you – in particular, you can not prevent that the windows nextcloud app (version 2.2.4) downloads new shared folders (as you can only exclude existing folders, but cannot prevent the download of new ‘small’ folders).
My question now is the following: Is there a way to ‘move’ shared folders to a seperate folder (let’s say the directory “/shared”)? Is it perhaps even possible to decide this on user level, i.e. one user wants the folders shared with him/her in the top level directory (as they are in the moment) and another want them to be in “/shared”?
If it is not possible to do so, I would request such a feature.

Best regards

Chris

1 Like

You can change the default destination for shared folders/files (from the root folder) to a pre-defined folder. Add the following line in config.php:

'share_folder' => '/',

Of course change the folder to a different directory and make sure this directory is created in each user folder (not sure if it will create it if it doesn’t exist yet).

As per the documentation link below the description is: Define a default folder for shared files and folders other than root.

https://docs.nextcloud.com/server/11/admin_manual/configuration_server/config_sample_php_parameters.html

3 Likes

Thank you very much for the fast and very helpful answer! I cannot believe that I missed it when I looked through config documentation. Thank you.

For the second part of the quesiton: Is there a way to define this on user-level, i.e. for each user independently? (Obviously the config file would not be the right place to do so)

Edit: And is there a way to change this shared folder in hindsight – when I change it now, then all the folder shared so far will still be top-level directories while new ones are added correctly. Combined I get a non-common behaviour :frowning: .

At this moment you can’t do it on user level, only globally. You can always raise an issue (request) for it, but to be honest it will be difficult to manage. Or you mean the user can set it themselves, which could be a new feature.

I also didn’t know this and also changed this afterwards. And as you state, it will be split (existing in the root, new ones in the configured folder). There might be a way to make changes in the database directly, but that is risky, and if something goes wrong maybe difficult to correct.