Name
os_chown — changes the owning group/user of a file
Synopsis
os_chown
(
|
in path varchar , |
in username varchar , | |
in
groupname
varchar
) ; |
Description
This function requires dba privileges.
os_chown
set the owning user/group of an OS file
by calling the system function chown() with the arguments supplied.
Not all the host OSes support the concept of owner users and groups. That's why the function will not throw an SQL error if it fails.
It will return DB NULL value when the function was executed successfully and the error message as a string if it failed.
The function first looks up the user and group name supplied into the OS database to get the user and group IDs. it then calls the system function chown().
The DirsAllowed and DirsDenied lists in Parameters section of the virtuoso configuration file (virtuoso.ini by default) are used to control disk access.
Parameters
path
varchar relative path.
username
varchar the name of the OS user to own the file.
groupname
varchar the name of the OS group to own the file.
Examples
Example 24.243. Simple example
Sets the ownership of the virtuoso INI file to virtuoso user and group
SQL>select os_chown (virtuoso_ini_path(), 'virtuoso', 'virtuoso'); callret VARCHAR _______________________________________________________________________________ NULL