[Nottingham] find and recursive home mounts

James Moore jmthelostpacket at googlemail.com
Tue Dec 6 10:09:00 UTC 2011


On 05/12/2011 17:34, Mike Martin wrote:
> Hi hoping someone knows a solution this scenario
>
> I have two boxen which have each others home directories mounted on home ie:
>
> box1 has home directory of box2 mounted on ~/box2
> box2 has home directory of box1 mounted on ~/box1
>
> both using sshfs, though I would expect same issue with NFA/CIFS
>
> however when I use find eg;
>
> find<dir>   -iname  'VIDEO_TS' -type d
>
> it loops recursively forever, descending into the two links recursively
> dir/DVD/VIDEO_TS
> dir/box2/box1/DVD/VIDEO_TS
> dir/box2/box1/box2/box1/DVD/VIDEO_TS
>
> anyone knows of any way to avoid this?
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham

I've seen this before, many moons ago, on an A3000 I had temporary 
custody of.

In that situation, home folders were contained in a hidden and encrypted 
partition, which if you didn't change the path designation and 
decrypt/mount the hidden partition first would result in the system 
looking in the default location for an unencrypted home folder. When it 
didn't find it, it'd throw a panic. The way around this was to change 
the name of the hidden encrypted folder and change the symlinks' path to 
reflect this change.  This had two effects: it stopped the system 
looking in the default location if you forgot to decrypt the encrypted 
folder and threw the expected "Not Authorised" page instead, rather than 
breaking the kernel. IIRC RISC OS 3.1 used such folder names as /home, 
/etc, /var, /bin et. al., as protected folder names and used them as 
default search start locations if it didn't find what it was looking for 
where it had been told to look.

On my Windows subnet I get around this problem by using small partitions 
which show as, for example, "//$box1/pub/", which netlinks actually 
point to the "My Documents" folder on the local machine ($box1). I think 
it could be something as easy as that; a simple name change.



More information about the Nottingham mailing list