1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 02:59:47 +01:00

Fix permissions for root user home directory

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-09-15 20:25:27 +02:00
parent 700395b508
commit 51a2c5ea17
3 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@ MOUNTED=1
mkdir /tmp/mnt.$$/etc /tmp/mnt.$$/etc_work
mkdir /tmp/mnt.$$/var_lib /tmp/mnt.$$/var_lib_work
mkdir -p /tmp/mnt.$$/usr/root /tmp/mnt.$$/usr_work
chmod 750 /tmp/mnt.$$/usr/root /tmp/mnt.$$/usr_work
chmod 700 /tmp/mnt.$$/usr/root /tmp/mnt.$$/usr_work
chown 0:0 /tmp/mnt.$$/usr/root
umount /tmp/mnt.$$
MOUNTED=0

View file

@ -57,7 +57,7 @@ MOUNTED=1
mkdir /tmp/mnt.$$/etc /tmp/mnt.$$/etc_work
mkdir /tmp/mnt.$$/var_lib /tmp/mnt.$$/var_lib_work
mkdir -p /tmp/mnt.$$/usr/root /tmp/mnt.$$/usr_work
chmod 750 /tmp/mnt.$$/usr/root /tmp/mnt.$$/usr_work
chmod 700 /tmp/mnt.$$/usr/root /tmp/mnt.$$/usr_work
chown 0:0 /tmp/mnt.$$/usr/root
umount /tmp/mnt.$$
MOUNTED=0

View file

@ -67,7 +67,7 @@ build() {
# setup root home directory
cp -r "$PKGBUILDDIR/etc/skel" "$PKGBUILDDIR/usr/root"
echo "usr/root m 750 0 0" >> "$DEPLOY/pseudo"
echo "usr/root m 700 0 0" >> "$DEPLOY/pseudo"
find "./usr/root" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
sed 's#^./##g' | tail -n +2 >> "$DEPLOY/pseudo"