Bash and badly mounted /home directories
Okay, it was my fault. The symptoms were certainly confusing, though.
I could not run bash shell scripts. It was maddening, because I normally run several. If I put “bash scriptname” it worked, but “./scriptname” would not run. It would argue about not having permissions, but I checked permissions and ownership and the shebang line and all, and it would just not work. I was badly confused, and my TFUG friends tried to help, but it was not obvious.
Likewise, I was having trouble with my eclipse install. I had tried purging and then reinstalling, dropping the .eclipse directory, all kinds of remedies, but the errors remained pretty confusing all along. I finally got enough trouble out of the way that I saw that I was getting a mmap permissions error.
The thing that had changed most recently was my playing with partitions. The partition I had mounted at /data was tiny, /home was tiny, and I had this great big Windows partition sitting around unused. Easy answer: nuke windows. I put ext3 on the windows partition and moved /home there. Now there’s plenty of space on / and /home. I used cp -rp so permissions should not have changed, and all looked fine. Then I took the old /home and moved the /data over to it. That tripled the space I had in the /data area. The remainder I put into swap, just in case.
So it is logical that any bizarre problems I have left would be as a result of the movement of files and the new partition mounting. So I finally take a look at my /etc/fstab.
In programming, I rant against cut-n-paste programming for just this kind of reason. I’d copied a line, and the line I copied had the options “defaults,users”. Users? Why in the world would I have that option for /home? It didn’t even make sense. I dropped that from the fstab and remounted /home. Not entirely surprisingly, I can execute bash shells just like in the good old days (last week) and I can run eclipse again. Apparently the “users” option has ugly side-effects so that mmap APIs cannot work, failing with a permissions error.
If you want to see how frustrating it is, go add the “users” to your mount options for /home and play around with it. You’d be surprised how often that mmap comes into play, and specifically who does it.
Now I have a rock-solid Ubuntu system again and all my tools and toys work just fine. I’m happy, and have learned my lesson.


