I'll try to take a look at it further and offer advice when I have more time.

Basically though you have a security issue as I view it. You should NOT allow the system to be in a non secure state that would allow a normal user to login and create and set his/her own shares and ACL (Access Control List)
To me this is just wrong and begs for someone to come along and abuse it and or really cause problems either on purpose or accidentally. You or someone else as an Admin should be the one creating this and setting security appropriately.

Now you can write code to help you as an Admin automate it but I would never allow a user to login and create.