Auto create Public and Drop shares for each user

Yes you are right, sorry for the typo. I found some other parts that needed corrections, too.

After having tested 16.0.7 and 18.0.1 RC2 I can confirm the bug. Will file an issue at github.
EDIT: Someone else ran into this before: Create Share API not honoring "permissions" parameter · Issue #17504 · nextcloud/server · GitHub

I have found 2 workarounds you could use:

  • Set the right permissions manually in WebUI -OR-

  • Update the share’s permission with HTTP PUT after creating the share:
    curl -X PUT -u test.user:goodpassword -d 'permissions=4' 'https://cloud.example.com/ocs/v2.php/apps/files_sharing/api/v1/shares/<shareID>' -H "OCS-APIRequest: true"

This doesn’t seem to be affected by the bug. The shareID is returned to you upon creation of the share:
nextcloud_api_create_share_response