Thread: webdav on n900
View Single Post
Posts: 20 | Thanked: 16 times | Joined on May 2011
#7
Originally Posted by kurtyy View Post
i'm interested. please provide your solution.
First, you need to edit some of the "system-files" and thus, you need permissions to do so. If you know how to do that, you may skip to A.

I tried doing this directly with the device, but I failed. Hence, I neded access to the N900 through my Computer (MacBook). I somehow managed to install sshfs (on both devices, I guess?). Can't remember properly what to do to enable this (you need to set a password on the N900, for example), but this is a different problem which is quite well documented at different places in the internet/in this forum. In OSX terminal, I then type:

sshfs root@IP.ADRESS.OF.N900:/ /media/N900/ -o allow_other -o uid=29999

(for IP.ADRESS.OF.N900 you need to enter the IP-Adress of your N900 in your wifi-net, type ifconfig in terminal to find it).

I then start emacs in OSX terminal, since I am a little familiar with this editor and I found out that typing "ESC-x find-file" and then "/root@IP.ADRESS.OF.N900:/" gives me easy access to the file-structure of the N900 and lets me edit and save files without annoying permission errors.

In order to enable the webdav protocol, three things needed to be done:

A. install davfs2, neon, fuse and libssl and edit config files

This is explained in detail here (in german, I am afraid):

http://www.n900forum.de/tipps-tricks...-mit-dem-n900/

So, you need to install four libraries: neon, fuse and davfs2 from http://nakkiboso.com/maemofuse (these are .deb files, so you need to find out how to install them, which is not too hard) as well as libssl with apt-get. (Not sure whether all those libraries can also be found using apt-get, in the meantime?)

Then you need to edit the files /etc/group and /etc/passwd according to the instructions (be aware that this is dangerous to edit these files). My /etc/group now contains a line

davfs2:x:GUID:

and etc/passwd contains a line

davfs2:*:GUID:GUID:davfs:/usr/etc/davfs2:/bin/sh

(please double check with the instructions in the link above)

GUID is a number and I simply took the next free number in the file /etc/group. So if in this file the last guid you can see is 1234, you might want to use 1235 as the guid? I have no clue, but for me, it worked.

In addition, the directory /usr/etc/davfs2 has to be created and within this directory the file "secrets" needs to contain the authentication information, that is one line as follows:

https://mediacenter.gmx.net LOGIN PASSWORD

LOGIN and PASSWORD are self explanatory, I guess.

Finally, issue "chmod 600 /usr/etc/davfs2/secrets" and "chown root /usr/etc/davfs2/secrets" in terminal.

In addition to that, I have to admit that I installed all sorts of libraries and programs related to this topic (wizard mounter, kernel-module-nls-utf8, kernel-module-ntfs, lighttpd-dav-gui, OpenSSH and others). So, no guarantee that you don't need one of those in addition to make it work.

B. Install the neon-library that has ssl support

However, all this did not work for me until I managed to install the right neon library that supports ssl. Compare this link:

http://think-free.homelinux.org/wordpress/

Instead of copying the ssl enabled library the way it is described there, I left the original name and changed the symlink in /usr/lib, so libneon.so.27 refers to libneon.so.27.2.3 (symlink changed with emacs using ESC-x make-symbolic-link).

Careful: It happend once to me that the symlink was reset to the default, probably because I installed a program and with this installation this symbolic link was changed in this folder? I just redefined it and it worked again.

C. Create mount directory and simplify mounting procedure (fstab)

(also according to http://www.n900forum.de/tipps-tricks...-mit-dem-n900/)

I have created the directory /mnt/gmx

and in /etc/fstab I placed:

https://mediacenter.gmx.net /mnt/gmx davfs noauto,user 0 0

The problem with the latter is that fstab gets autogenerated at startup. So I found this thread

http://talk.maemo.org/showthread.php?t=39023

and I thus added

echo "https://mediacenter.gmx.net /mnt/gmx davfs noauto,user 0 0" >> /etc/fstab

to the file "/etc/event.d/rcS-late" after the occurence of "rm -f $tmp_fstab" in that file.

Now in the N900 terminal application typing "sudo mount /mnt/gmx" is sufficient to mount the webdav drive; be sure to have "rootsh" application installed, so you don't have to type the password every time you use "sudo". Of course, you can now write a little script just containing the line "sudo mount /mnt/gmx" and create a shortcut to your desktop (there are proper directions in this forum). Every time you push this icon, the drive gets mounted. Unmounting is with "sudo umount /mnt/gmx" and this would then need its own desktop icon.

Mounting the webdav drive works well, however, I am not able to mount a webdav drive and a samba drive with vpn-tunnel through wizard-mounter at the same time. But this might simply be a problem with my settings, I don't care too much.

Good luck and sorry, if my directions contain any mistakes or if I forgot something, it was quite complicated... ;-)
 

The Following 6 Users Say Thank You to toebaer For This Useful Post: