Open junalmeida opened 8 years ago
FWIW, I'm having a similar issue, also with -f -o allow_other -o uid=1000. When I become root via sudo or su, I don't get the above error (sometimes I get a Segmentation fault, though). However, sometimes it works. It always gets the above error when run as a daemon (monit runs a script that invokes MegaFuse if needed).
@junalmeida Did you ever find a fix for this?
Steps to reproduce:
sudo su
env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/sh
MegaFuse -c /path/to/megafuse.conf -f -o allow_other
The env line re-creates the shell environment typically available to daemons.
After comparing two shell environments - one where the above error happens 100% of the time and one where it happens 0% of the time - I found a workaround. If you add HOME to your shell's environment, this error goes away.
Put this line before any MegaFuse invocation:
export HOME=/root
Without looking at the source code, I'd guess that something involved in processing the fuse parameters requires knowing what $HOME
is, assumes it's non-null, then tries to assign it to a String.
My upstartjob: