Forum .LRN Q&A: Re: Figuring out the community_id for a folder in file-storage

Hi,

i dont know why you need the admin user_ids but you should get the list of public folders with this query:

select
  cri.item_id,
  cri.name
from
  cr_items cri, fs_root_folders frf, site_nodes s2,
  site_nodes s1, dotlrn_communities_core dcc
where
  cri.parent_id = frf.folder_id
  and frf.package_id = s2.object_id
  and dcc.package_id = s1.object_id
  and s1.node_id = s2.parent_id
  and s2.name = 'file-storage'
  and cri.name = 'public';

you could use a pgsql to go thru all of the folder and change permissions.

Sorry, in your installation it will probably be "dotlrn_communities_all" instead of "dotlrn_communities_core".