Attaching a sieve script to a shared folder is a little tricky. First, you need to understand that Cyrus has two types of repositories where you can have Sieve scripts: Personal and Global. Personal is per user and global is for every user. Global scripts aren’t applied on incoming messages by default, users must include them in their scripts.
Also, there are two types of Global scripts: global and global per domain.
When you log into Cyrus IMAP with sieveshell you have the following combinations (I suppose that you have manager and firstname.lastname@example.org as admin in imapd.conf):
sieveshell -a manager -u manager localhost: To edit global scripts.
sieveshell -a email@example.com -u firstname.lastname@example.org localhost: To edit global script of example.com domain.
sieveshell -a email@example.com -u firstname.lastname@example.org localhost: To edit personal scripts of some user.
Scripts for shared folders work different from user scripts. The last ones are uploaded to the user’s repository and attached to the inbox when you activate them. The first ones must be uploaded to the global domain repository and attached to a shared folder by an user that has permission on it. You have to use the second combination of the listed above to load them and cyradm (or another compatible client) to do the attach:
sieveshell -u email@example.com -a firstname.lastname@example.org localhost
> put /tmp/my_script my_script
cyradm -u email@example.com localhost
localhost.localdomain> mboxcfg firstname.lastname@example.org sieve my_script