chown

Purpose

Changes the owner of a file or list of files.

Syntax and Description

chown user[:usergroup ] file [file ...]

Table 10-70 lists the syntax options for the chown command.


Table 10-70 Options for the chown command

Option Description

user

The name of the user that becomes the new owner.

usergroup

Name of the user group to which the user belongs.

file

Name of a file.


user typically refers to the user that owns the database instance home. Oracle ASM File Access Control uses the operating system (OS) name to identify a database.

This command accepts a file name or multiple file names separated by spaces.

If you change the ownership settings of an open file, then the following applies:

  • The operation currently running on the file completes using the old ownership and user group settings. The new settings take effect when re-authentication is required.

  • The new owner of the file cannot be dropped from the disk group until all instances in a cluster are restarted in a rolling manner.

Only the Oracle ASM administrator can use this command.

Examples

The following are examples of the chown command that change the owner of the specified files to the oracle1 operating system user.

Example 10-79 Using the ASMCMD chown command

ASMCMD [+fra/orcl/archivelog/flashback] > chown oracle1 log_7.264.684968167 log_8.265.684972027

ASMCMD [+fra/orcl/archivelog/flashback] > chown oracle1:asm_fra log_9.264.687650269