User Tools

Site Tools


k19:k19.3:k19.3.1:start

19.3.1 Instructions CHOWN, CHMOD and CHGRP

As of Gambas 3.1, three new instructions are available to change the user/owner, group or permissions of a file.

19.3.1.1 CHOWN

The CHOWN (change owner) instruction changes the owner/proprietor of a file or directory:

CHOWN Path TO User
  • Path is the file or directory path,
  • User is the name of the new owner/proprietor.

19.3.1.2 CHGRP

The CHGRP (change group) instruction changes the group membership of a file or directory:

CHGRP Path TO Group 
  • Path is the file or directory path,
  • Group is the name of the new group.

19.3.1.3 CHMOD

The CHMOD (change mode) instruction changes the permissions (mode) of a file or directory:

CHMOD Path TO Mode 
  • Path is the file or directory path,
  • Mode is a string of nine characters describing the new 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.

Example:

CHMOD sFilePath To "rwxrw-r--"

Download

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.
k19/k19.3/k19.3.1/start.txt · Last modified: by 127.0.0.1