How to change folder permission? My method don't work

Hello! I need to grant all permissions to a folder (with files) for two users (admin and owner) and role “serverCodeUser” and remove permissions for all other users.

I have correct folder name and user id, all code completed without errors, but it does not affect permissions.

I used File API “Set permission to all users” and "Set permission to ".

Invoked from online console with different API keys.

Code lookimng like this:

  await Backendless.Files.Permissions.READ.denyForAllUsers((String('/path/') + String(param1)));
  await Backendless.Files.Permissions.DELETE.denyForAllUsers((String('/path/') + String(param1)));
  await Backendless.Files.Permissions.WRITE.denyForAllUsers((String('/path/') + String(param1)));
  await Backendless.Files.Permissions.READ.grantForUser(uid, (String('/path/') + String(param1)));
  await Backendless.Files.Permissions.DELETE.grantForUser(uid, (String('/path/') + String(param1)));
  await Backendless.Files.Permissions.WRITE.grantForUser(uid, (String('/path/') + String(param1)));

  return true

If there is any way to do this operation from Flutter API - it would be best

Hello @A2_Capital,

If there is any way to do this operation from Flutter API - it would be best

I’ve created an internal ticket BKNDLSS-26234 to add those methods to Flutter-SDK.

To setup relations using REST or via terminal please use this API.

curl -X PUT -H Content-Type:application/json -d "{\"permission\":\"READ\", \"role\":\"test1\"}" -v ''

Also you can setup permissions directly in the console by pressing the Permissions button of the selected file:


Thank you!