10

Is there a possibility to create a hard link for an unix socket? I'm creating a jail and symbolic links won't work, so I'm looking for a solution, how to provide an unix socket inside chrootted environment.

The only idea I'm coming across is to use something like netcat but is there any reliable possibility?

eRIZ
  • 220

1 Answers1

6

Linux at least would allow you to use a bind mount to make either a directory or alternatively a single file available at multiple places.

  # mount --bind /var/MySQL.sock /chroot/var/MySQL.sock 
Xunnamius
  • 103
HBruijn
  • 84,206
  • 24
  • 145
  • 224