maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Fuse and sshfs? (https://talk.maemo.org/showthread.php?t=36654)

nymajoak 2010-01-31 16:16

Re: Fuse and sshfs?
 
I've mucked about with sshfs a bit and got it to work. But..

My remote directory has a number of subdirectories and in some cases sub-subdirectories. Accessing this directory structure works fine using the terminal, MicroB, emelfm2, mc and when ssh:ing into the device.

The problem is with the native file browser. It refuses to show any content in subdirectories. They all appear empty. The same thing happens in Petrovich. It doesn't matter if I mount as user or as root (with -o allow_other).

Actually the topmost (alphanumerically speaking) subdirectory is not empty but instead contains seemingly random files/directories from one of the other subdirectories..

I've googled the issue but not come up with anything useful. Is the file browser working correctly for you guys or is it it bug filing time? :)

hallgreng 2010-02-04 06:56

Re: Fuse and sshfs?
 
umounting as a non-root user...

let a user invoke umount with sudo:
Code:

#echo 'user ALL = NOPASSWD: /bin/umount' >> /etc/sudoers
then you can umount with
Code:

$sudo umount /mounted/directory/
i dont like messing around with sudo (i dont use it on my desktop for anything), but it works ^_^
also, mind that this seems to have been undone after the PR1.1 update, so you may have to redo this from time to time.

doesnt hurt to also do it for 'ping'. i use ping and umount in an sshfs mounting script that determines if im on my local lan or if i need to mount over the internet.
Code:

#echo 'user ALL = NOPASSWD: /bin/ping' >> /etc/sudoers

EDIT:
my file browser browses through my ssh mount just fine (albeit a little slowly). i dont know what could be causing your issues digging into the sub directories nymajoak...

my mount command is:
Code:

sshfs -o reconnect,allow_other,uid=1000 -p 22 hallgreng@hallgren-fs.hallgren.net:/ /home/user/MyDocs/hallgren-fs
mount reports as follows:
Code:

hallgreng@hallgren-fs.hallgren.net:/ on /home/user/MyDocs/hallgren-fs type fuse.sshfs (rw,nosuid,nodev,max_read=65536,allow_other,user=user

nymajoak 2010-02-04 11:34

Re: Fuse and sshfs?
 
Quote:

Originally Posted by hallgreng (Post 509948)
my file browser browses through my ssh mount just fine (albeit a little slowly). i dont know what could be causing your issues digging into the sub directories nymajoak...

my mount command is:
Code:

sshfs -o reconnect,allow_other,uid=1000 -p 22 hallgreng@hallgren-fs.hallgren.net:/ /home/user/MyDocs/hallgren-fs
mount reports as follows:
Code:

hallgreng@hallgren-fs.hallgren.net:/ on /home/user/MyDocs/hallgren-fs type fuse.sshfs (rw,nosuid,nodev,max_read=65536,allow_other,user=user

Thanks for that, good to know it "should" work. :)

I didn't use the reconnect, allow_other and uid options so I tried adding them one after the other. My mtab reports the same as your mount now. Unfortunatelly the subdirectory behavior didn't change.

Maybe I should try reinstalling the file manager. Hmm.. Wonder how I do that..

hallgreng 2010-02-04 16:54

Re: Fuse and sshfs?
 
i was going to call myself a liar and say that it DID work but no longer does, however it still does work -but at a completely unusable speed.
45sec to get the contents of /home/ which has ONE directory in it!
it used to be pretty zippy, but no longer. i blame the PR1.1 update.
at least it works well on the command line.

lfcobra 2010-03-21 02:13

Re: Fuse and sshfs?
 
Was wondering if anyone here might be able to help me.

I have sshfs all setup on my n900, and I've made a shell script that will either mount (if not already mounted) or unmount (if it is mounted) the ssh file system. When i run the script from the terminal it works perfectly fine. The file system is mounted and i'm able to access all my content and and when i run the script again it unmounts and I no longer have access. Works exactly like I expect it to.

My problem is that I have followed this how to
http://www.themaemo.com/howto-launch...om-a-shortcut/
to make a shortcut that will run my script. When I click the icon it launches the terminal and i have to type the password for the remote computer as expected. But for some reason the file system is not mounted.

I've tried playing around with the Exec line thinking that was the issue. I've tried the following (my script is located in /usr/bin)
Exec=/usr/bin/osso-xterm ssh_script.sh
Exec=/usr/bin/sh ssh_script.sh
Exec=/usr/bin/ssh_script.sh
Exec=rootsh /usr/bin/osso-xterm ssh_script.sh
None of which resolved the matter of the file system not being mounted. Any ideas?

One more question: After a file system has been successfully mounted I am unable to follow symbolic links. I was curious if this is the correct behavior of sshfs or not.

SubCore 2010-03-23 10:03

Re: Fuse and sshfs?
 
Quote:

Originally Posted by lfcobra (Post 575390)
Exec=rootsh /usr/bin/osso-xterm ssh_script.sh
None of which resolved the matter of the file system not being mounted. Any ideas?

try
Code:

Exec=/bin/busybox sh -c /usr/bin/ssh_script.sh
or, if you need root privileges, maybe this:
Code:

Exec=/bin/busybox sh -c 'echo /usr/bin/ssh_script.sh | sudo gainroot'
as for symlinks - i haven't noticed anything, but i'm not sure if the shares i mount actually contain any.

horli 2010-05-31 18:57

Re: Fuse and sshfs?
 
For the symlink problem add follow_symlinks option to sshfs

LippiVan 2010-08-03 13:21

Re: Fuse and sshfs?
 
Quote:

Originally Posted by qole (Post 429342)
As White Bear points out on his website, you have to do it from the (root) command line:

Code:

apt-get install sshfs

I've tried installing sshfs this way, but I'm always getting an error:

" Temporary failure resolving 'repository.maemo.org' "

Does this have anything to do with PR.1.2?
I'd really like to be able to mount my shares this way, so any help is very appreciated!
thx!

Edit: I've installed all packages manually, seems to be working great!
I'm just amazed of the capabilities of the N900 over and over again, it's never getting boring :)

toxaris 2011-02-03 13:28

Re: Fuse and sshfs?
 
A question.
Can I use sshfs thru a firewall?
I can SSH to the shell on my NAS thru my firewall.
But then I do:
sshfs root@<my public IP>: /path/to/my/files /media/nfs
I get thi error: "Read: Connection reset by peer"

Doing something wrong?
I can mount when Im on the same network.

www.rzr.online.fr 2012-04-18 21:24

Re: Fuse and sshfs?
 
note that sshfs is also working on harmattan :



http://rzr.online.fr/q/fuse# InstalL #SshFs on your MeeGo #HarmattaN HandSet to #MounT RemotE #FileSystem, enlarge your RootFs !n950club !n9


All times are GMT. The time now is 11:46.

vBulletin® Version 3.8.8