I had a similar issue with a previous version of NC, but thought I'd report it again with NC28.0.4
The problem is that despite defining explicit sharing permissions when creating a public share via curl and the API, these are ignored and the defaults are used.
Steps to reproduce
Create a share via curl. For example: curl -u user:pass -X POST 'https://nc.local/ocs/v2.php/apps/files_sharing/api/v1/shares?shareType=3&publicUpload=true&permissions=4&path=/Upload' -H "OCS-APIRequest: true"
Expected behavior
With the above, and having explicitly defined permissions=4, the share is created with the default "31" persmissions. Here's the output of the above:
The share attributes are clearly defined as 31.
The produced link works, but of course provides all the sharing permissions and not what I explicitly requested - upload only / dropbox.
I can "fix" this by updating the share via a second API request but this really shouldn't be necessary if the permissions attribute is followed as described in the OCS Share API documentation.
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
RHEL/CentOS
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
⚠️ This issue respects the following points: ⚠️
Bug description
I had a similar issue with a previous version of NC, but thought I'd report it again with NC28.0.4 The problem is that despite defining explicit sharing permissions when creating a public share via curl and the API, these are ignored and the defaults are used.
Steps to reproduce
Create a share via curl. For example:
curl -u user:pass -X POST 'https://nc.local/ocs/v2.php/apps/files_sharing/api/v1/shares?shareType=3&publicUpload=true&permissions=4&path=/Upload' -H "OCS-APIRequest: true"
Expected behavior
With the above, and having explicitly defined permissions=4, the share is created with the default "31" persmissions. Here's the output of the above:
The share attributes are clearly defined as 31. The produced link works, but of course provides all the sharing permissions and not what I explicitly requested - upload only / dropbox.
I can "fix" this by updating the share via a second API request but this really shouldn't be necessary if the permissions attribute is followed as described in the OCS Share API documentation.
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
RHEL/CentOS
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response