Page 14 of 14 FirstFirst ... 4121314
Results 131 to 139 of 139

Thread: SSHFS AUTOmount on Feisty

  1. #131
    Join Date
    Apr 2007
    Beans
    27

    Re: SSHFS AUTOmount on Feisty

    I'm not able to get it to mount when automatically
    It umount automatically without a problem

    When I run it manually i get this


    ignacio@ignacio-Laptop:/etc/network/if-up.d$ ./homedir
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    [: 109: missing ]
    ./homedir: 109: id-un: not found
    /home/ignacio/homedir mounted as current user ()

    and it mounts fine.

    Any idea of how to fix it?

    Thanks!

  2. #132
    Join Date
    Nov 2011
    Beans
    3

    Shouldn't it be 'if-post-down.d'?

    First of all, Thank you for your script, it made things a lot easier.

    I've just noticed that when my internet connection is unexpectedly cut (i.e. weak wireless signal), the file manager would freeze up. It turned out that /etc/network/if-down.d/umountsshfs did not execute.
    After some hours of investigation, I've solved the problem by moving umountsshfs script to /etc/network/if-post-down.d, which would make it execute some time after the time of disconnection.

    It would be nice if this problem was specific to my system.

    Thanks.

  3. #133

    Re: SSHFS AUTOmount on Feisty

    As I know;

    When you use "if-down.d", you are allowing the normal unmount before the connection is really down, but when you use "if-post-down.d" the unmounts occur after disconnection, and any final transaction will fail (such as cache flush or close files in use).

    The umount action needs (if possible) alive connection to communicate the end of the SFTP session and release any locked resource.
    I see the same situation as unmounting an USB pendrive before or after unplugging it with the hand.
    Narcis Garcia

  4. #134
    Join Date
    Nov 2011
    Beans
    3

    Re: SSHFS AUTOmount on Feisty

    But in some situations the connection is suddenly down (i.e. weak wireless signal) so that any "final transactions" could not take place. Maybe that's why the file manager froze up after the wireless is down.

    In any case, I had better work in a secure connection so as to keep safe my files.

  5. #135

    Re: SSHFS AUTOmount on Feisty

    Unmounting before network disconnection minimizes probability of data loss, because many umounts will go as expected (other can have unexpected connection break).

    Another kind of example: if you are talking on the phone with a friend, it's better to first say "good bye" and after hung up the phone, than first hung up and after say "good bye".
    When unmount, you are saying "good bye" to the other computer.
    Narcis Garcia

  6. #136
    Join Date
    Jul 2006
    Beans
    Hidden!

    Re: SSHFS AUTOmount on Fesity, Gutsy, Hardy, Intrepid

    I know this might seem counter-intuitive for this post, but is it possible for sshfs automount to work with a passphrase-enabled key with ssh-agent? That is, when the computer is turned on, and the network is connected, ubuntu's ssh-agent would ask for the passphrase. Then enter the passphrase once and automount will work for the remainder of the session without asking for the passphrase again.

    I've been using the sshfs autmount method described in this post for the past year, but I just think having a passphrase-enabled key + ssh-agent is essential for better security.

  7. #137
    Join Date
    Jun 2008
    Beans
    1

    Re: SSHFS AUTOmount on Feisty

    I wrote a guide on using this with a web development virtual machine for mapping subdirectories to subdomains:

    http://otaqui.com/blog/1652/setting-...ldocumentroot/

  8. #138
    Join Date
    Oct 2009
    Beans
    47

    Re: SSHFS AUTOmount on Feisty

    If I unplug the ethernet cable, then replug it a few seconds later, should all the scripts in /etc/network/if-up.d/ run? Is there some longer amount of time the cable needs to be unplugged for?

  9. #139

    Re: SSHFS AUTOmount on Feisty

    Please, take note of the subject, that talks about Feisty version (7.04)
    spookybathtub, the best thing you can do to check this in your OS version, is to put some custom script in the directory (/etc/network/if-up.d/) and test.
    Example script to watch executions at /tmp/test.log :

    #!/bin/sh
    date +'%F %T' >> /tmp/test.log
    Narcis Garcia

Page 14 of 14 FirstFirst ... 4121314

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •