3

'm trying to create a folder (directory) for a jailed user on my server that will allow him to access another folder outside of his jail. I'm trying to do this with symlink but all it does is create a file, instead of a folder. He's using FTP and I want a folder that will behave like all his other folders, except it links to a separate folder. Is there a reason why my symlinks all show up as files? Thanks.

mdpc
  • 11,698
  • 28
  • 51
  • 65
user183479
  • 31
  • 2

1 Answers1

7

I think what you want here, is to bind mount the target directory inside the jail of the user. You can't symlink out of a jail. Look at this, for instance:

mount --bind /media/sdb2/mydocs/archive /home/username/archive
Halfgaar
  • 7,921
  • 5
  • 42
  • 81
  • The first parameter is the directory, you want to make accessible by the jail user. the second it the local name visible to the jail user – rubo77 Mar 03 '20 at 14:03