I'm on TCL17.1 x86_64. My home directory is not persistent and I use the user=bruno bootcode.
TL;DR version: Just read the last paragraph of this post.
I see this error during boot:
mkdir: "/home/bruno/.local/bin" Permission denied
Something similar has been previously reported (
https://forum.tinycorelinux.net/index.php?topic=16036.15) but I think what I'm experiencing is a bit different than what's described at the link.
There are two places during boot where something to the effect of mkdir ~/.local/bin appears:
1. the setupHome function (which is called in /etc/init.d/tc-config but defined in /etc/init.d/tc-functions), which contains this line:
mkdir -p /home/"$USER"/.local/bin
2. this line in ~/.profile:
[ -d "$HOME/.local/bin" ] || mkdir -p "$HOME/.local/bin"
setupHome is innocent here because /home/"$USER" already exists when setupHome is called, so the then part of the if-then that contains the mkdir statement is not executed.
I can confirm that the mkdir that's causing the error during boot is the one in ~/.profile
After boot process is complete, it's no wonder the mkdir statement (which is in ~/.profile so run by normal user, not root) fails:
$ ls -ld $HOME/.local
drwxr-sr-x 3 root staff 60 Sep 7 14:07 /home/bruno/.local
$ find $HOME -user root -type d
./.local
./.local/share
I have found two workarounds.
First workaround is to change this in ~/.profile:
[ -d "$HOME/.local/bin" ] || mkdir -p "$HOME/.local/bin"to this:
sudo chown -R $(cat /etc/sysconfig/tcuser):staff "$HOME/.local"
[ -d "$HOME/.local/bin" ] || mkdir -p "$HOME/.local/bin"Second workaround is to edit my /opt/.filetool.lst and make sure nothing from ~/.local/share is included. For example, if my /opt/.filetool.lst looks like this
etc/fonts
etc/group
etc/resolv.conf
etc/shadow
etc/ssl
etc/thunderbird
home/bruno/.local/share/profanitythen I see the mkdir error during boot. But if I change /opt/.filetool.lst to just this
etc/fonts
etc/group
etc/resolv.conf
etc/shadow
etc/ssl
etc/thunderbirdand create a new backup (filetool.sh -b), then the mkdir error during boot goes away.
I'm perplexed by this second workaround. Anything I include in my backup in the form of /home/bruno/.local/share/foo (no matter what it is, no matter that everything along the path is owned by bruno:staff) causes /home/bruno/.local and /home/bruno/.local/share to be owned by root and the mkdir error during boot. Any ideas what's going on here?