Export share rights into CSV

Hi,
is it possible to export the access to my shared libraries into a CSV or something similar?

Like
Librarie1;User1(R/W);User2(.R.);User3(Admin)
Librarie2;… you get it.

We have 203 Libraries at this point and had an audit which user has access to which files. This is a litle pain in the a**.

We have 1 “Master” Account which manages all Libraries for our company.

bye Andre

Hi Andre,

just do an SQL query like this:

select name, from_email, to_email, permission from SharedRepo join RepoInfo repo_id on SharedRepo.repo_id;

You will get a list like this:

name                    from_email           to_email             permission
Meine Bibliothek        xmuster@xyz.de       zmuster@xyz.de       rw
...

If you use the command line you can redirect the result into a file:

mysql -u seafile -p seafile-db --password=secret -e "select name, from_email, to_email, permission from SharedRepo join RepoInfo repo_id on SharedRepo.repo_id" > shares.txt

Dirk

1 Like

i give this a try next week. Thank you very much!

just 4 month later and i gave it the first try, yea i know, i’m not the fastest one.

The results are mixed …

There are two very strange things. First i see libraries which are non existent and never were. And the Seccond thing is, that i see the shares multiple times.

I added an screenshot, this is 1 librarie, shared with our file server. This is for almost every librarie and every user.

Anything i can do about it? I can’t be the only one who gets an data protection audit and who needs this kind of export.