Fixed upload permissions distinction between public and logged in upload

Fixes #5370
Merge pull request #5378 from owncloud/files-permissionsafteruploadfix

Fixed upload permissions distinction between public and logged in upload