# Disable personal folders in cell

**URL:** <https://forum.pydio.com/t/disable-personal-folders-in-cell/4764>\
**Category:** Pydio Cells\
**Created:** [October 28, 2022, 11:24am UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764 "2022-10-28T11:24:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbs](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/sbs/32/1787_2.png) [@sbs](https://forum.pydio.com/u/sbs)\
**Post date:** [October 28, 2022, 11:24am UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764/1 "2022-10-28T11:24:03Z")

</div>

Hello,

Is there a way to prevent users to upload files to their own personal folders?

(This is related to the cell API not able to delete files in personal folder [Cells purging question - #18 by scott.bentley](https://forum.pydio.com/t/cells-purging-question/3087/18)).

I need to enforce from purging polycies on the files size, but there are completely circumvented by the personal folders which cannot be accessed using the API.

Regards,

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [November 2, 2022, 6:09pm UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764/2 "2022-11-02T18:09:40Z")

</div>

Hello,

> cell API not able to delete files

> the personal folders which cannot be accessed using the API

I don’t understand what you are talking about, can you be more specific??? The API is used to access any workspaces, personal or not…

That said, you can change the “root group” permissions on “Common Files” and “Personal Files” if you want to prevent users from writing into their own folder.

---

<div class="post-metadata">

**Author:** ![sbs](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/sbs/32/1787_2.png) [@sbs](https://forum.pydio.com/u/sbs)\
**Post date:** [November 3, 2022, 6:43am UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764/3 "2022-11-03T06:43:43Z")

</div>

Hello @charles ,

As stated in the topic I linked in the OP, I had to fiddle a bit to get my code to do the simple task of :

- List all files in storage with size and age to select some for purging
- I found how to convert the filename reported when listing the files to a datasource for deleting the appropriate file except for the personal files (this my post/question).

I am probably misusing the API, but did not find a suitable forum post or white paper explaining how to do this task.

I am using the following API to list files in a datasource :  
result, err := cli.AdminTreeService.ListAdminTree(params)

and I have an ugly part to rename the filepath to datasource:

```auto
 NodePath := strings.Replace(n.Path, "projetsds/", "projets/", 1)
 NodePath = strings.Replace(NodePath, "pydiods1/", "common-files/", 
//NodePath = strings.Replace(NodePath, "personal/", "personal-files/", 1)

```

Then I use the delete API to remove the files  
ok, ret := cli.TreeService.DeleteNodes(DeleteList)

I can post the full code here or elsewhere (if more convenient) if it can help understanding whta I do wrong.

Regards,

---

<div class="post-metadata">

**Author:** ![sbs](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/sbs/32/1787_2.png) [@sbs](https://forum.pydio.com/u/sbs)\
**Post date:** [November 22, 2022, 2:58pm UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764/4 "2022-11-22T14:58:07Z")

</div>

Hello @Charles,

No answer means question is not relevant or clear enough? I am missing something too obvious?

Regards,

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [November 22, 2022, 5:42pm UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764/5 "2022-11-22T17:42:59Z")

</div>

Hello, @sbs  
Sorry for the delay, I just … forgot your post.  
You should not be using the “AdminTreeService” and “TreeService” together. As you notice, the first is giving “absolute” paths including the datasource name, whereas the second is listing files **in the perspective of a user view.**  
So if as an admin you need to access all files for listing and purging, I would suggest the two steps :

- create a workspace that is only accessible by admin, and where you gather all roots of all datasources. Connecting to this workspace, you should be able to see everything.
- Then use TreeService.BulkStatNodes() to list all files using NodePaths parameters, e.g. using “path/to/dir/\*” (like you would on linux ls)

Tell me if this helps  
-c

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [January 21, 2023, 5:43pm UTC](https://forum.pydio.com/t/disable-personal-folders-in-cell/4764/6 "2023-01-21T17:43:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
