File permissons
-
Hi
I want to know how file permission are determined after installation, for example rc.initial have -rwxr-xr-x.
How can i change some permissions in my custom installation iso? -
On 2.1 there is an mtree file/database that is used to set/check permissions on install and upgrade. Grep through the source for mtree and you'll find the code.
-
Dear Jim,
there are many 'mtree' word in /usr/pfSensesrc directory . in /usr/pfSensesrc/src/etc/mtree , bsd files exist. Can you be more specific? -
In the pfSense git repos, not the FreeBSD source/builder filesystem.
-
I found only these things in pfsensegitrepo:
etc\rc.firmware(62): /usr/sbin/mtree -Pcp /${files} | bzip2 -9 > /tmp/chflags.dist.${files}.bz2 2>> /conf/upgrade_log.txt etc\rc.firmware(69): cd / && /usr/bin/bzcat /tmp/chflags.dist.${files}.bz2 | /usr/sbin/mtree -PU -p /${files} >> /conf/upgrade_log.txt 2>&1 tmp\post_upgrade_command(119): MTREECHKDIR=/tmp/${1}/ tmp\post_upgrade_command(121): MTREECHKDIR=/ tmp\post_upgrade_command(123): if [ -f ${MTREECHKDIR}etc/installed_filesystem.mtree ]; then tmp\post_upgrade_command(124): /usr/sbin/mtree -U -e -q -f ${MTREECHKDIR}etc/installed_filesystem.mtree -p ${MTREECHKDIR} > /conf/mtree.log;
-
Yep, and now you can see where the .mtree file is and how it sets the permissions (the last line)