Hi,
I am a bit confused on my learning of permissions. I'll try my best to explain what I have done.
I have created a new unprivileged user with the following commands
sudo dscl . -create /Users/Privoxy
sudo dscl . -create /Users/Privoxy UserShell /usr/bin/false
sudo dscl . -create /Users/Privoxy RealName "Privoxy"
sudo dscl . -create /Users/Privoxy UniqueID 503
sudo dscl . -create /Users/Privoxy PrimaryGroupID 1000
sudo dscl . -create /Users/Privoxy NFSHomeDirectory /no/Home
sudo passwd Privoxy
and a group with the following commands
sudo dscl . create /groups/Privoxy
sudo dscl . create /groups/Privoxy name Privoxy
sudo dscl . create /groups/Privoxy passwd "*"
sudo dscl . create /groups/Privoxy gid 1000
Now I ran the commands
sudo chmod g-rwx /usr/local/Privoxy/*
sudo chmod o-rwx /usr/local/Privoxy/*
sudo chmod g-rwx /usr/local/Privoxy
sudo chmod o-rwx /usr/local/Privoxy
sudo chown -R Privoxy

rivoxy /usr/local/Privoxy
Okay, so I believe this is what is done to lock down a program to a unprivileged user and limit the risk of exploits.
I was reading the Privoxy man page (
Man page of PRIVOXY) and it mentioned something about 'chroot'. A quick google of chroot lead me to believe 'chroot' would improve the security of what I have already done.
Now when I start Privoxy with (What I thought was the correct command)
sudo /usr/local/Privoxy/sbin/privoxy --chroot /usr/local/Privoxy/ --user Privoxy.Privoxy /usr/local/Privoxy/etc/config
Privoxy aborted. So I assumed maybe the option '--chroot' did not need '/usr/local/Privoxy/' and removed it from the command.
So now I start Privoxy with the command
sudo /usr/local/Privoxy/sbin/privoxy --chroot --user Privoxy.Privoxy /usr/local/Privoxy/etc/config
Privoxy returns error
Mar 20 10:20:13.494 Privoxy(000000a8) Fatal error: Cannot chroot to /no/home
Now in the terms of security,
Should I leave the home folder of user Privoxy to '/no/home/' and NOT use '--chroot' while starting Privoxy?
Or
Should I change Privoxy's home folder to '/usr/local/Privoxy' and USE '--chroot' while starting Privoxy? Keep in mind that in either case of setting Privoxy's home folder, Privoxy's shell path remains '/usr/bin/false' as from what I understand Also limits the impact of exploits.
Thanks
Matt Roseman