[quote]One tiny bit outside question, is it safe to give friends sftp access, to what extent can they abuse their power,
i just want to jail them inside a directory is that possible, also that directory should appear in the web[/quote]
Well, it is might be “safer” to some limited degree to “jail” them to a given directory, but you need to consider that whatever they upload/do, you will be held responsible for their actions. There is always a degree of risk in doing this no matter how you set it up.
This may not be of much concern to you if you know the other user very well, and trust not only that they would not break the rules in the TOS but that they are knowledgeable enough not to do accidental damage.
I would not allow someone I did not know very well, and trust completely, to do this. This is another reason I prefer scripts to facilitate this rather than turning them loose with SFTP. With scripts managing the access, I have a better chance of catching some problematic things they might want to upload (scripts, illegal warez, etc), and I can more closely control what they are able to do.