As of Gambas 3.1, three new instructions are available to change the user/owner, group or permissions of a file.
The CHOWN (change owner) instruction changes the owner/proprietor of a file or directory:
CHOWN Path TO User
The CHGRP (change group) instruction changes the group membership of a file or directory:
CHGRP Path TO Group
The CHMOD (change mode) instruction changes the permissions (mode) of a file or directory:
CHMOD Path TO Mode
At http://gambaswiki.org/wiki/cat/mode or https://wiki.ubuntuusers.co.uk/rights you can read about the mode syntax. In addition, any omitted or unknown character in the mode string is ignored. In this way, you can change selected values of file permissions.
CHMOD sFilePath To "rwxrw-r--"