From: Damon T. <dam...@gm...> - 2007-04-20 20:28:53
|
Hi - thanks for your reply ... let me see if I understand you correctly ... Running: $ sshfs us...@ip...: /local/mount/point -o sftp_server=MYNEWSCRIPT And then having my new script (/usr/bin/MYNEWSCRIPT) on the linux server say: #!/bin/bash export LD_PRELOAD=/usr/lib/libtrash/libtrash.so.2.4 /usr/lib/openssh/sftp-server #that's it? I tried that and it didn't work. I don't know a lot about this ... sorry. Thanks again for your help. Damon On 4/20/07, Miklos Szeredi <mi...@sz...> wrote: > > > I have libtrash installed on the file server; I run calls to it via: > "export > > LD_PRELOAD=/usr/lib/libtrash/libtrash.so.2.4" ... for netatalk, I added > this > > line to the /etc/init.d/netatalk script; for bash commands, I added it > to > > /etc/profile ... so, when I delete a file from my AFP network volume, it > > gets moved to the "Trash" on the file server. Same goes for if I use > the > > "rm" command. This way, no more "permanent deleting" ... get a chance > at > > redemption. > > > > However, I am not sure where to implement this so it will work with my > sshfs > > mount. Does anyone have any ideas where I might call the LD_PRELOAD > ? I > > don't know what sshfs utilizes when it mounts a folder ... I am not > familiar > > with fuse system at all. > > You can use the sshfs option "sftp_server=SERV", where SERV may be a > shell script on the server that loads libtrash and starts sftp-server > (usually found in /usr/lib/sftp-server /usr/lib/ssh/sftp-server or > something like that). > > Miklos > -- "In Search of #6", a travelogue & memoir by Damon Timm available for free online as an audiobook / podcast or to read at: http://www.damonjustisntfunny.com |