Changing Ownership of File Assignment Help

Assignment Help: >> Security - Changing Ownership of File

Changing ownership of a file

This command is basically used for change the ownership of a file.

By using chown the group ownership of a file can also be changed as given

Syntax

chown [ -fhR ] owner [ : group           ] file ...

Options

-f         -    Whenever this option is used errors are not reported

-h         -  Changes the owner of the symbolic link if the file is a symbolic link. Without this the owner of the file referenced by the symbolic link is changed option,

-R        -  Recursively descends through the directory and   any subdirectories this setting the ownership ID as it proceeds. Whenever a symbolic link is encountered, the owner    of   the target file is modified (unless the -h option is specified), but no recursion takes place. The subsequent operands are supported:

owner[:group]           -    Specifies a user and optional group ID to be assigned to a file . The owner portion of this operand have be a user name from the user database or a numeric user ID

file       -    Specifies a path name of a file whose user ID is to be modified

To modify ownership of all files in the hierarchy, involving symbolic links, but not the targets of the links the giving can be used:

$ chown -R -h owner  [:group]           file...

Note:  Only the owner of a file or the super-user might modify the owner of that file. But the owner of the file is by default avoiding from modifying the owner ID of the file. Only the    super-user can arbitrarily modify owner IDs to make the user to change the ownership of a file, involve the next line in /etc/system in Solaris:

set rstchown = 1

To disable this option, the nixt line in /etc/system:

set rstchown = 0

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd