I have posted a guide for setting up a Network Trash Folder/System on a Ubuntu File Server. The packaged used is libtrash, and is available in the repositories. Because the post and instructions are long, I am going to leave them at:

How to: Network Trash on Ubuntu File Server (NAS) with SFTP (SSH + Fuse) and AFP (netatalk)

Once this is running when you delete files via "rm" or sftp or afp they will be moved to a ~/Trash folder (instead of disappearing completely.

It works for me but may not work for you. Happy to help you with problems if I can, but I am no expert and may not be able to. Also, some of the suggestions could make things stop working -- use at your own risk.