Next: , Previous: , Up: file commands   [Contents][Index]


6.2.11 Setting file owner and group

Function: mbfl_file_enable_owner_and_group

Declare the intention to use the programs required to change file owner and group. Declaring the intention to use a program

The programs are: chown, chgrp, stat.

To change the file owner and group one may request the use of sudo: just request a user before invoking the following function. Executing a program

Function: mbfl_file_set_owner owner pathname [opt …]

Change the file owner for pathname; owner must be in a form accepted by chown. The optional arguments opt are handed to chown as options.

Function: mbfl_file_set_group group pathname [opt …]

Change the file group for pathname; group must be in a form accepted by chgrp. The optional arguments opt are handed to chgrp as options.

Function: mbfl_file_get_owner pathname
Function: mbfl_file_get_owner_var _RV pathname

Print the owner of the file as symbolic name.

The function variant _var stores the result in the variable _RV, rather than print it; Result variables.

Function: mbfl_file_get_group pathname
Function: mbfl_file_get_group_var _RV pathname

Print the group of the file as symbolic name.

The function variant _var stores the result in the variable _RV, rather than print it; Result variables.

Function: mbfl_exec_chown pathname [opt …]

Raw interface to chown. The mandatory argument pathname is handed to chown as argument. The optional arguments opt are handed to chown as options.

Function: mbfl_exec_chgrp pathname [opt …]

Raw interface to chgrp. The mandatory argument pathname is handed to chgrp as argument. The optional arguments opt are handed to chgrp as options.


Next: , Previous: , Up: file commands   [Contents][Index]

This document describes version 3.0.0-devel.0 of Marcos Bash Functions Library.