# How retain folder structure, when sharing subfolders?

**URL:** <https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010>\
**Category:** ℹ️ Support\
**Tags:** nc18-nextcloud-hub, sharing\
**Created:** [May 18, 2020, 2:02pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010 "2020-05-18T14:02:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clarion](https://help.nextcloud.com/letter_avatar/clarion/32/5_5575768a8748004e209b776fc1b2916d.png) [@Clarion](https://help.nextcloud.com/u/Clarion)\
**Post date:** [May 18, 2020, 2:02pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/1 "2020-05-18T14:02:28Z")

</div>

As Admin, if I share a subfolder (within a folder structure) to a user with a registered account on my server, I want the browsing experience for the user to retain the existing folder structure, regardless of what I share or don’t share. But I’m having problems understanding how to achieve this. Could use some help.

An example: Imagine the following folder- and subfolder structure:

[Toplevel Folder]  
----- \> [Subfolder A]  
---------- \> [Subsubfolder B1]  
---------- \> [Subsubfolder B2]  
---------- \> [Subsubfolder B3]  
----- \> [Subfolder B]  
---------- \> [Subsubfolder C1]

If I share only “Subfolder B2” with a user on my server, and this user have no other rights, then this user will see only a new folder in his folder list, called “Subfolder B2”.

This is both confusing an visually displeasing in my view. I will want the user to see the toplevel folder, and when he goes into that folder I want him to see the folders called Subfolder A (but not subfolder B, because he haven’t got access rights to anything under that folder). And when he goes into Subfolder A I want him to se one folder called Subfolder B2 (but not Subfolder B1 or B3, because he doesn’t have access rights to those).

Is there some setting, or code or customization which enables this, o allows me to create this condition somehow?  
And I prefer to use regular sharing instead of group folders, because group folders seems to have a file upload bug that isn’t addressed.

Thanks for any help

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/5_5575768a8748004e209b776fc1b2916d.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [May 20, 2020, 7:33am UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/2 "2020-05-20T07:33:40Z")

</div>

> **[Nextcloud 16 implements Access Control Lists to replace classic File Servers...](https://nextcloud.com/blog/nextcloud-16-implements-access-control-lists-to-replace-classic-file-servers/)**
>
> While Nextcloud is often used in companies to replace aging ‘shared folder’ solutions like a Windows Network Drive, the sharing model modern Dropbox-like solutions use is very different. Rather than a single, fixed folder structure available to all...

> [@Subfolders permissions](https://help.nextcloud.com/t/subfolders-permissions/10081):
>
> Hi there, I would like to know if I can share a subfolder in a top share with different permissions then the one defined first. Example: If I create a Finance folder and share it for all finantial department is it possible to create a subfolder CFO where only the CFO can access? Thank you in advance.

> [@Folder permissions and sharing](https://help.nextcloud.com/t/folder-permissions-and-sharing/30201):
>
> Hi! I need help. How do you do in Nextcloud if you want to share a folder with a group of users, but inside that are other folders that you don’t want some of the users to have access? Thanks!

> [@Group Folder Permissions - inherit ACLs to subfolders and files](https://help.nextcloud.com/t/group-folder-permissions-inherit-acls-to-subfolders-and-files/61030):
>
> Nextcloud 16 enables granular file and folder permissions using ACLs. I am having trouble when it comes to inherited (inheriting) ACLs. What I want to achieve: Create a Group folder with no sharing permission at all. Then I want to create subfolders and set granular permissions which are then inheriting to their children. I’ve tried several permission settings but currently they’re not inherting to child-items and folders, even when I set them to inherit. - Or at least the child items do no…

---

<div class="post-metadata">

**Author:** ![Clarion](https://help.nextcloud.com/letter_avatar/clarion/32/5_5575768a8748004e209b776fc1b2916d.png) [@Clarion](https://help.nextcloud.com/u/Clarion)\
**Post date:** [May 20, 2020, 1:21pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/3 "2020-05-20T13:21:50Z")

</div>

Thanks for response @tflidd.

Yes, the group folder option would’ve solved a lot. But I feel it’s not open to me at this time.

Using group folders seems to introduce a bug, or at least incompatibility, and there seems to be no fix for it in sight. I ran into this strange behaviour myself when I tried the group folder option and it’s either a straight up bug or incompatibility with the file encryption system.

The bug prevents- or complicates user’s ability to synchronize and/or upload files into shared folders and group folders. ([https://github.com/nextcloud/groupfolders/issues/71](https://github.com/nextcloud/groupfolders/issues/71))

If there was a solution for THAT, I’d be on the Group Track train instantly.

---

<div class="post-metadata">

**Author:** ![Escubaer](https://help.nextcloud.com/user_avatar/help.nextcloud.com/escubaer/32/6091_2.png) [@Escubaer](https://help.nextcloud.com/u/Escubaer)\
**Post date:** [May 20, 2020, 3:51pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/4 "2020-05-20T15:51:15Z")

</div>

It continues to be amazing for me how people are stuck on the traditional, hierarchical representation of folders and files. Why do tags not serve the same purpose for you?

Group Folders will continue to have its challenges, fully agree with you. But why is it not possible to embrace the advantages of the flexible sharing system provided and use tags and other meta data for a description of whats in the folder?

---

<div class="post-metadata">

**Author:** ![Clarion](https://help.nextcloud.com/letter_avatar/clarion/32/5_5575768a8748004e209b776fc1b2916d.png) [@Clarion](https://help.nextcloud.com/u/Clarion)\
**Post date:** [May 20, 2020, 6:52pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/5 "2020-05-20T18:52:12Z")

</div>

@Escubaer Well, I can hear the frustration there 🙂

The problem I see, is that I use folders to organize things into categories. If a folder is named “Contracts”, then whoever enters into it knows that all titles he will find inside there are only contracts.

Documents  
-----Contracts  
----------Annas deals  
----------Bobs deals  
----------Archived deals  
---------------2020  
---------------2019  
---------------2018

If a subfolder under contracts is called “Archived deals”, then we already know it is archived contract deals, and then in the next subfolder level we got years. Having the folders labelled and organized like this, means you affects the users ability to instantly know and sort what he/she is looking at. And I don’t have to write all of this into the file name, making file/folder names half a city block long.

But if I share the 2018 folder with a user, and no previous folder structure is inherited, then this user won’t see the context from which to understand thje folder. No “Documents”, nor “Contracts” or anything beneath … he won’t see or understand anything, other than that he now have a folder in his root directory, called “2018”. That’s no good.

One workaround for that, would be to name every folder the full context name: Documents.Contracts.Archived.Deals.2018. The bad idea with this, is that users who have access to plenty of folders will see every shared folder as a separate folder, meaning a long long row of independent folders all in his root directory with no sorting other than folder name first letter sorting.

This is a big part of why I feel I can use the folder structure intact even when I share a subfolder.

You said “_Why is it not possible to embrace the advantages of the flexible sharing system provided and use tags and other meta data for a description of whats in the folder?_”

You may know more about this than I do. You are right in the sense that I did grow my sense of organization from looking into a DOS prompt, then Windows File Explorer and running an FTP server for a while. I frankly am not sure how you mean by ‘using tags and metadata’ in place of folder names …? Maybe you know something I don’t know about Nextcloud’s options, and I’m all ears (no sarcasm).

---

<div class="post-metadata">

**Author:** ![Escubaer](https://help.nextcloud.com/user_avatar/help.nextcloud.com/escubaer/32/6091_2.png) [@Escubaer](https://help.nextcloud.com/u/Escubaer)\
**Post date:** [May 22, 2020, 7:23am UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/6 "2020-05-22T07:23:41Z")

</div>

You could give all the files or the folders a “contract” tag to serve the same purpose.  
[https://docs.nextcloud.com/server/latest/user\_manual/files/access\_webgui.html?highlight=tag](https://docs.nextcloud.com/server/latest/user_manual/files/access_webgui.html?highlight=tag)

And in the folder description you can write that its contracts, that is a file which is moving inside the folder along with it …

I fully understand the issue, when using traditional folder structures, but thats why I recommend to leverage the features of the platform …

---

<div class="post-metadata">

**Author:** ![devnull](https://help.nextcloud.com/user_avatar/help.nextcloud.com/devnull/32/27793_2.png) [@devnull](https://help.nextcloud.com/u/devnull)\
**Post date:** [May 22, 2020, 8:01am UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/7 "2020-05-22T08:01:04Z")

</div>

> [@Clarion](#):
>
> [Toplevel Folder]  
> ----- \> [Subfolder A]  
> ---------- \> [Subsubfolder B1]  
> ---------- \> [Subsubfolder B2]  
> ---------- \> [Subsubfolder B3]  
> ----- \> [Subfolder B]  
> ---------- \> [Subsubfolder C1]

If you have no problem with long names, you can perhaps use this names for sharing folders from admin:

```
> ----- > [A]
> ---------- > [A - B1]
> ---------- > [A - B2]
> ---------- > [A - B3]
> ----- > [B]
> ---------- > [B - C1]

```

---

<div class="post-metadata">

**Author:** ![Clarion](https://help.nextcloud.com/letter_avatar/clarion/32/5_5575768a8748004e209b776fc1b2916d.png) [@Clarion](https://help.nextcloud.com/u/Clarion)\
**Post date:** [May 22, 2020, 11:44am UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/8 "2020-05-22T11:44:29Z")

</div>

@Escubaer Ok. I think I see your point. Though I must say can’t say I see many benefits with it - at all, frankly. Since you said you can’t really understand why some people is reluctant to tag and labels for organization, I can write a few of these points out for you:

If no folder structure is deemed beneficial, then one might as well just throw all files (documents, PDFs, images, videos) into 1 folder, call that folder “Files”, and never go into that folder visually, right? Just search out the desired files using tags?  
But if a folder structure is beneficial, in any way at all, then one might as well use that for orientation instead of tags.  
That way I also won’t be dependent on however users actually remembered to tag their files or not, or if they misspelled their tags or put the wrong type of tags in etc. I mean, users will have to tag an audio file “audio”, even though the file extension (wav, aif, mp3 etc) is already searchable. There are way too many open doors for errors to slip in through that way.

How do you use versioning with tags? Since a document can only be found by tags, you’d have to add the version as a new tag too, right? Press-release, Press-release update, press-release update 2, press-release update 3 etc. It begs for mistakes too.

Folders also give you a way of exploring visually, going through and building the same idea of a structure in your head as the other users/personnel have, so you can speak on the same terms with others. Searching using tags won’t give you that. It’s more like operating a command prompt, you get no sense of structure or organization, just a different row of resulting files depending on how you formulate a search term.

And you won’t actually know if there are physical files out there, in the unknown cyberstorage, that haven’t been tagged properly and therefore lies forgotten, virtually invisible (to a tag search). With a folder system, you visually see all files. But with a tag system you only see what is tagged, and only if they are tagged properly too. You may have tons of rouge forgotten files around without knowing it.

Tags makes it hard for a new user too, who cannot know what to search for. They are not familiar with what tags and label to search for, what the present term-system is. I would have to give them a glossary of terms/tags which will provide them with desired results. And I would have to teach them how to save tags into all newly created files too.  
With a folder system for organization, not even a 7-year-old needs any form of introduction. It is infinitely less BS, intuitive and direct. Using folders for orientation is using our eyes, the sense we use for 90% of our informational intake. It’s why Microsoft upgraded DOS into visual Windows, to interact with the computer though. Tags however, uses almost no visuals, and almost only memory.

Sharing files with other becomes equally difficult. If you store files with no folder structure, and you are then asked to share all files of a specific concern with a specific user, (different files types too) , you’d probably have to go through each concerned file and share it one by one. And as a result, the other user will then see lots of separate files (the shared files) in his root directory, with no visual structure and under no folder.  
With a folder structure however, the structure is already in place. All you do is share the concerned folder, and the other user will see the same thing as you. Done.

Those are a few of the problems I see with using a tag system instead of a folder structure, and why I don’t find it beneficial to use. Tags may be used as a complement though.

I am currently back experimenting with different encryption options, so I can perhaps somehow use the Group Folder option anyway. Group Folders make it rather easy to maintain the existing folder structure even through sharing, but Group Folders don’t work well with different storage encryptions, even though I plan to store everything on site and not use external storage.

---

<div class="post-metadata">

**Author:** ![crobarcro](https://help.nextcloud.com/user_avatar/help.nextcloud.com/crobarcro/32/7523_2.png) [@crobarcro](https://help.nextcloud.com/u/crobarcro)\
**Post date:** [October 5, 2020, 12:28pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/9 "2020-10-05T12:28:07Z")

</div>

Can you search tags on your local synced files? As far as I was aware this wasn’t possible.

---

<div class="post-metadata">

**Author:** ![ssi](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ssi/32/41561_2.png) [@ssi](https://help.nextcloud.com/u/ssi)\
**Post date:** [February 13, 2021, 8:57pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/10 "2021-02-13T20:57:01Z")

</div>

As a relatively new user to Nextcloud (who has used Owncloud for a long time), I’d like to thank @Clarion for clearly articulating this problem and that tags are not an acceptable workaround.

Sharing subfolders results in their showing up at the top-level in user accounts that have access to the share. And if shared subfolders have the same name, it is not possible to distinguish them. For example, assume the following directory structure:

A/sub/…  
B/sub/…

If both of the above sub folders are shared, they show up as the top-level folders:

sub  
sub (2)

This is not good.

Consider the larger case where someone receives shares from within their organization and from external nextcloud users. It will become increasingly confusing to have these various shares show up at the top-level directory.

Here’s what I suggest:

1. Because shares can come from the organization’s own nextcloud server or some external nextcloud server, it is necessary to have a top-level entry that identifies the organization server. This should be the FQDN of the nextcloud server.

2. Because shares can come from various users, the 2nd level directory should be the username of the user granting the share.

3. Because the shared folder can be a subfolder, the remaining directory levels to the share should be preserved to the user receiving the share by default. With (1) and (2) in force, I can envision an option during sharing in which the user can choose to omit the full path. But, this should not be the default as even a single user in a single organization might share subfolders of the same name.

For example:

[cloud.company1.com/userA/A/sub/](http://cloud.company1.com/userA/A/sub/)… # userA has 2 “sub” folders to share  
[cloud.company1.com/userA/B/sub/](http://cloud.company1.com/userA/B/sub/)…  
[cloud.company1.com/userB/sub/](http://cloud.company1.com/userB/sub/)… # userB has only 1 “sub” folder to share and elects to not use the full path  
[cloud.company2.com/userA/C/sub/](http://cloud.company2.com/userA/C/sub/)… # default full path  
[cloud.company3.com/userA/sub/](http://cloud.company3.com/userA/sub/)… # default full path not chosen

It is reasonable to offer the option of not using full paths if it is the case that full paths would reveal company information that would not want to be disclosed and if multiple paths are distinct.

Another modification of this approach is to provide an option in which a share prefix can be explicitly entered during sharing so as to provide appropriate context while at the same time not revealing company private information that a path might otherwise convey.

---

<div class="post-metadata">

**Author:** ![AlNiCo](https://help.nextcloud.com/user_avatar/help.nextcloud.com/alnico/32/24333_2.png) [@AlNiCo](https://help.nextcloud.com/u/AlNiCo)\
**Post date:** [February 15, 2021, 6:12pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/11 "2021-02-15T18:12:55Z")

</div>

Hi,  
I share the same concern. I finally choose the **suffix** option as a workaround.  
The department name is the suffix.

- companyA\_accounting
- companyB\_accounting
- companyA\_marketing  
etc.

---

<div class="post-metadata">

**Author:** ![danell](https://help.nextcloud.com/letter_avatar/danell/32/5_5575768a8748004e209b776fc1b2916d.png) [@danell](https://help.nextcloud.com/u/danell)\
**Post date:** [September 17, 2021, 3:38pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/12 "2021-09-17T15:38:11Z")

</div>

1+ for this feature.

I’m working in a movie production company and we have a folder structure like this:  
[shots]  
–\>[s01t01]  
–\>[s01t02]  
–\>[s02t01]  
–\>…  
[plates]  
–\>[video]  
----\>[skys]  
----\>[explosions]  
–\>[images]  
----\>…

So what I wish to do is to share the needed shots folders to the vfx artist that will work on them and the needed plates folder, say the explosions folder.  
That way everyone won’t access all the footage and all the plates as that can be sort of a security issue.

While still keeping the full folder structure it will be easy to just add/remove access to different folders and who ever will get the folders in the end it will look the same for everyone.  
So a feature like this would be more than welcome for a workflow like this.

---

<div class="post-metadata">

**Author:** ![szaimen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/szaimen/32/63019_2.png) [@szaimen](https://help.nextcloud.com/u/szaimen)\
**Post date:** [September 17, 2021, 5:22pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/13 "2021-09-17T17:22:21Z")

</div>

Hi, the recommended way is to use the groupfolders app for this:  
[https://apps.nextcloud.com/apps/groupfolders](https://apps.nextcloud.com/apps/groupfolders)

---

<div class="post-metadata">

**Author:** ![ssi](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ssi/32/41561_2.png) [@ssi](https://help.nextcloud.com/u/ssi)\
**Post date:** [November 29, 2021, 2:01pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/14 "2021-11-29T14:01:20Z")

</div>

@szaimen The **groupfolders** app is not a scalable solution. Requiring admins to manage sharing is not reasonable. Nextcloud should offer the ability to share files and folders in a way that does not lead to ambiguity. See my post on Feb 13, 2021.

The Nextcloud platform has sharing as a core feature: it needs to be improved to avoid ambiguity. I am open to working with Nextcloud on an implementation design.

---

<div class="post-metadata">

**Author:** ![szaimen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/szaimen/32/63019_2.png) [@szaimen](https://help.nextcloud.com/u/szaimen)\
**Post date:** [November 29, 2021, 2:18pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/15 "2021-11-29T14:18:13Z")

</div>

Delegation for groupfolders comes with NC23, afaik.

---

<div class="post-metadata">

**Author:** ![ssi](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ssi/32/41561_2.png) [@ssi](https://help.nextcloud.com/u/ssi)\
**Post date:** [November 29, 2021, 8:41pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/16 "2021-11-29T20:41:46Z")

</div>

@szaimen If delegation still requires admin setup, then it is not an acceptable solution. Users need to be able to self-service their sharing needs. Also, not addressed is the significant issue of how ambiguities are resolved. If multiple people want to share a folder terminating in some identical name, it is important that shares be done in a way that lends itself back to understanding of who shared them, etc. See my post above.

---

<div class="post-metadata">

**Author:** ![szaimen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/szaimen/32/63019_2.png) [@szaimen](https://help.nextcloud.com/u/szaimen)\
**Post date:** [November 29, 2021, 8:49pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/17 "2021-11-29T20:49:15Z")

</div>

No, delegation means that also selected non-admin users will be able to create groupfolders etc, afaik.

---

<div class="post-metadata">

**Author:** ![szaimen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/szaimen/32/63019_2.png) [@szaimen](https://help.nextcloud.com/u/szaimen)\
**Post date:** [November 29, 2021, 8:51pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/18 "2021-11-29T20:51:36Z")

</div>

Also see this PR: [Implement Admin delegation for group folder by CarlSchwan · Pull Request #1722 · nextcloud/groupfolders · GitHub](https://github.com/nextcloud/groupfolders/pull/1722)

---

<div class="post-metadata">

**Author:** ![Stonerocker](https://help.nextcloud.com/letter_avatar/stonerocker/32/5_5575768a8748004e209b776fc1b2916d.png) [@Stonerocker](https://help.nextcloud.com/u/Stonerocker)\
**Post date:** [December 16, 2021, 8:32pm UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/19 "2021-12-16T20:32:43Z")

</div>

+1  
Group folders is also not really working for me. A real solution would be highly appreciated! 😃

---

<div class="post-metadata">

**Author:** ![Jasmin](https://help.nextcloud.com/letter_avatar/jasmin/32/5_5575768a8748004e209b776fc1b2916d.png) [@Jasmin](https://help.nextcloud.com/u/Jasmin)\
**Post date:** [August 14, 2022, 10:46am UTC](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010/20 "2022-08-14T10:46:33Z")

</div>

Hi @Clarion thank you very much for the great formulation of the problem as well as its defense. As long as this challenge remains unsolved, Nextcloud is not yet practicable for us. I hope that something will happen here soon. [Here there is still a possible solution approach via Groupfolders](https://help.nextcloud.com/t/group-folder-in-subfolder-of-root/86759)

[Next page](https://help.nextcloud.com/t/how-retain-folder-structure-when-sharing-subfolders/82010.md?page=2)
