***Background***
This issue was raised one year ago here. But because we haven't pushed the change into official Porteus, I'm going to provide a way to fix this for those who are interested.
***Explanation***
For those who, like me, use rootcopy in FAT/NTFS units (for restoring volatile files during boot) you may end up with wrong permissions in some system folders, which may break some applications, like VirtualBox:
https://www.mediafire.com/view/vgca2wu5 ... before.png
This is a limitation in the original /boot/syslinux/initrd.xz. Here's the code of the relevant part:
Code: Select all
if param norootcopy; then
ROOTCOPY=none
echo $i"skipping /rootcopy directory"
else
if [ $ROOTCOPY ]; then
locate -d $ROOTCOPY
if [ $? -eq 0 ]; then echo $i"copying content of $ROOTCOPY directory"; cp -af /mnt/$DEV/$LPTH/. /union/. 2>/dev/null; else fail $ROOTCOPY; ROOTCOPY=none; fi
else
ROOTCOPY=none
echo $i"copying content of $PTH/rootcopy directory"
cp -af $PTH/rootcopy/. /union/. 2>/dev/null
fi
fi
With this change we can make sure that when rootcopy is in a POSIX file system (i.e. not FAT/NTFS) it will restore the original permissions (just like original Porteus), however if rootcopy in a NON-POSIX file system (FAT/NTFS) it will not change the destination folders/files permissions if they already exist in the system, and it will give drwxr-xr-x/-rwxr-xr-x permission for those that don't exist in the system:
Code: Select all
if param norootcopy; then
ROOTCOPY=none
echo $i"skipping /rootcopy directory"
else
FILESYSTEM=$(cat /etc/fstab | grep -o /mnt/$DEV.* | cut -f2- -d' ' | cut -f1 -d' ')
if [ $FILESYSTEM = "ntfs" ] || [ $FILESYSTEM = "vfat" ]; then
ISPOSIX=0
COPYPARAMS="-rf"
else
ISPOSIX=1
COPYPARAMS="-af"
fi
if [ $ROOTCOPY ]; then
locate -d $ROOTCOPY
if [ $? -eq 0 ]; then echo $i"copying content of $ROOTCOPY directory"; cp $COPYPARAMS /mnt/$DEV/$LPTH/. /union/. 2>/dev/null; else fail $ROOTCOPY; ROOTCOPY=none; fi
else
ROOTCOPY=none
echo $i"copying content of $PTH/rootcopy directory"
cp $COPYPARAMS $PTH/rootcopy/. /union/. 2>/dev/null
fi
if [ $ISPOSIX -eq 0 ]; then chown -R guest /union/home/guest 2>/dev/null; fi
fi
https://www.mediafire.com/view/hyifwcea ... /after.png
***Fixing***
1- Make a backup of /boot/syslinux/initrd.xz
2- Copy the new initrd.xz, reboot and be happy
https://www.mediafire.com/file/l70qmmat ... /initrd.xz