<!ELEMENT ownership (option?, name+)> <!ATTLIST ownership base CDATA #IMPLIED user CDATA #IMPLIED group CDATA #IMPLIED> |
This element occurs in the elements alfs, else, stage. and then
The element ownership is used to perform a group and/or user ownership change on a file or set of files
The only option supported is "recursive"
The sub-element name contains the name of the file (or directory) whose ownership is to be changed.
The attribute base specifies the directory in which the command is performed.
The attribute user specifies the name of the user which will own the file or directory
The attribute group specifies the name of the group which will own the file or directory
The first example uses symbolic names.
<ownership user="root" group="root"> <option>recursive</option> <name>/etc/rc.d</name> <name>/etc/sysconfig</name> </ownership> |
The equivalent bash script is :
echo Changing group of /etc/rc.d into root chgrp -R root /etc/rc.d echo Changing owner of /etc/rc.d into root chown -R root /etc/rc.d echo Changing group of /etc/sysconfig into root chgrp -R root /etc/sysconfig echo Changing owner of /etc/sysconfig into root chown -R root /etc/sysconfig |
The second example uses numeric values (0 = root).
<ownership user="0" group="0"> <option>recursive</option> <name>/etc/rc.d</name> <name>/etc/sysconfig</name> </ownership> |
The equivalent bash script is :
echo Changing group of /etc/rc.d into 0 chgrp -R 0 /etc/rc.d echo Changing owner of /etc/rc.d into 0 chown -R 0 /etc/rc.d echo Changing group of /etc/sysconfig into 0 chgrp -R 0 /etc/sysconfig echo Changing owner of /etc/sysconfig into 0 chown -R 0 /etc/sysconfig |