Hello everyone!
I've been trying to create an ebuild file for Dr.Web antivirus and
encountered very strange and inconsistent behaviour. The fowners command
does not change the ownership of files for some of the directories
listed in the ebuild file. Here is the snip of my ebuild:
---snip---
src_install ()
{
cp -a ${S}/opt/ ${D}/opt || die "copy of opt dir failed"
cp -a ${S}/var/ ${D}/var || die "copy of var dir failed"
cp -a ${S}/etc/ ${D}/etc || die "copy of etc dir failed"
# Create log dir in proper location
mkdir -p ${D}/var/log/drweb
# Create drweb user/group
enewgroup drweb
enewuser drweb -1 /bin/false /var/drweb drweb
# Chown drweb dirs
fowners drweb:drweb /opt/drweb/
fowners drweb:drweb /var/drweb/
fowners drweb:drweb /etc/drweb/
# Chown logging directory in proper location
fowners drweb:drweb /var/log/drweb
}
---snip---
The ownership of /opt/drweb/, /var/drweb/ and /var/log/drweb got
changed, but the ownership of /etc/drweb/ still remained root:root.
See from below:
---snip---
# ls -ld /etc/drweb/ /opt/drweb/ /var/drweb/ /var/log/drweb
drwxr-xr-x 2 root root 4096 Jan 13 21:11 /etc/drweb/
drwxr-xr-x 5 drweb drweb 4096 Jan 13 21:30 /opt/drweb/
drwxr-xr-x 7 drweb drweb 4096 Jan 13 21:30 /var/drweb/
drwxr-xr-x 2 drweb drweb 4096 Jan 13 21:30 /var/log/drweb
---snip---
Am I doing something wrong? I don't get why would the same command
change the ownership of all directories except for 1?
Also, how do I change the ownership of all directory contents? Doing
fowners drweb:drweb /opt/drweb only changes the ownership of /opt/drweb
and not the files contained in that dir. I've tried adding -R switch
(like in chown) without any luck.
Thanks for any help
--
Andrei Mikhailovsky
Arhont Ltd - Information Security
Web: http://www.arhont.com
http://www.wi-foo.com
Tel: +44 (0)870 4431337
Fax: +44 (0)117 9690141
PGP: Key ID - 0xFF67A4F4
PGP: Server - keyserver.pgp.com
--
[email protected] mailing list