Page 1 of 3 123 LastLast
Results 1 to 20 of 45
  1.    #1  
    As I already mentioned in another thread you can install a WebDAV server on your palm and connect to it using native operating system methods (MacOSX Finder, Windows File Explorer) to transfer files to and from the palm. In that post I described how to do that with "pyDav", a python webdav server. But this didn't work with Windows Vista and were unsecure.

    Now I figured out a new method, which is secure (connection is encrypted and password protected) and works on Vista too. I attached some screenshots how it looks on mac and vista.

    You have to install lighttpd, a lightweigt HTTP server offering some additional modules, one of them being mod_webdav. The software is available via Optware.

    Since the installation is somewhat complicated I created an installer script which does every required tasks to enable WebDAV on the palm.

    You'll need root access on the palm and Optware installed.

    Download the attached script, upload it to your palm (e.g. using scp) and execute it:

    Code:
    root@palm-webos-device: # sh /opt/home/scip/install-webdav-0.0.1.txt
    The installer will ask you for a username and a password!

    Note:
    Connect using the URL that the installer displays upon completion (or find the ip address of your phone and use https://your-ip-address/. When connecting a popup will appear informing you that the remote server (your palm!) uses an untrusted certificate, acknowledge that. Then you will be asked for the username and password you entered during installation.

    How to connect to the webdav directory:
    MaxOSX: Connecting to a WebDAV server
    MS Vista: How to Map WebDAV folder Under Vista/XP


    --------------------------

    In the next time I'm planning to write a java service to enable/disable webdav and add/modify users along with an app to control it. Stay tuned.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by debilater; 12/10/2009 at 05:39 AM.
  2. #2  
    Hi!

    I'm having a few problems mounting the Drive following this instructions, maybe someone could help me
    How to Map WebDAV folder Under Vista/XP | Windows Reference

    I can access my pre from firefox (using my username and password, and accepting the SSL error)
    but when trying to mount the drive it asks me for user an password, i use the same that were set for htdigest but it doesn't accept them... asks me again and tells me that the folder seems invalid, try another

    I opened your script and did everything except
    1. Didn't install lighttpd (already installed from optware)
    2. Didn't Rewrite lighttpd startup script
    3. Didn't Create Upstart event
    4. Starting lighttpd

    2, 3 and 4 I think are the same as the ones that are created when installing from preware

    However, I added a few lines to the lighttpd.conf file

    index-file.names = ( "index.html" )
    dir-listing.activate = "enable"
    dir-listing.hide-dotfiles = "enable"
    static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb" )

    Thanks!
  3. jrtesq's Avatar
    Posts
    105 Posts
    Global Posts
    116 Global Posts
    #3  
    Thanks for the summary. I was planning to setup SSH soon, but this looks easier. How does the security compare to SSH?

    One thing I haven't understood, is there something you have to run/start on the Pre every time you want to connect wirelessly with WebDAV to the desktop computer? Or is the Pre just always ready to connect on the fly? What about SSH? Do you have to run or start a process on the Pre every time you want to SSH, or is it always ready to go?

    Personally, I think I'd rather have to run/start something each time I want to connect. Seems like it might be more secure that way.

    Any insight you can give would be invaluable.

    Thanks.
    It may seem like I am doing nothing, but on a cellular level I'm really quite busy.
  4. #4  
    What am I doing wrong?

    root@palm-webos-device:/# sh /media/internal/install-webdav-0.0.1.txt
    sh /media/internal/install-webdav-0.0.1.txt
    Set / rw
    Installing lighttpd
    Installing lighttpd (1.4.25-1) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/op...tpd_1.4.25-1_a
    rm.ipk
    Nothing to be done
    Successfully terminated.
    Collected errors:
    Package lighttpd md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update
    '.
    Creating dummy openssl.cnf
    /media/internal/install-webdav-0.0.1.txt: line 71: cannot create /opt/etc/lighttpd/openssl.cnf: none
    xistent directory
    Failed to create /opt/etc/lighttpd/openssl.cnf!
    Set / ro
    root@palm-webos-device:/# ipkg update
    ipkg update
    root@palm-webos-device:/# sh /media/internal/install-webdav-0.0.1.txt
    sh /media/internal/install-webdav-0.0.1.txt
    Set / rw
    Installing lighttpd
    Installing lighttpd (1.4.25-1) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/op...tpd_1.4.25-1_a
    rm.ipk
    Nothing to be done
    Successfully terminated.
    Collected errors:
    Package lighttpd md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update
    '.
    Creating dummy openssl.cnf
    /media/internal/install-webdav-0.0.1.txt: line 71: cannot create /opt/etc/lighttpd/openssl.cnf: none
    xistent directory
    Failed to create /opt/etc/lighttpd/openssl.cnf!
    Set / ro
    root@palm-webos-device:/#
  5. #5  
    Quote Originally Posted by cdbillups View Post
    What am I doing wrong?
    maybe you already had lighttpd installed from preware???

    This is the script I used to install

    Code:
    ipkg-opt install openldap-libs
    
    mount -o remount,rw /
    cat > /opt/etc/lighttpd/openssl.cnf <<EOF
    
    [ req ]
    default_bits = 1024 		# Size of keys
    default_keyfile = key.pem 	# name of generated keys
    default_md = md5  		# message digest algorithm
    string_mask = nombstr  		# permitted characters
    distinguished_name = req_distinguished_name 
    
    [ req_distinguished_name ]
    # Variable name   	  Prompt string
    #----------------------   ----------------------------------
    0.organizationName = Organization Name (company)
    organizationalUnitName = Organizational Unit Name (department, division)
    emailAddress = Email Address
    emailAddress_max = 40
    localityName = Locality Name (city, district)
    stateOrProvinceName = State or Province Name (full name)
    countryName = Country Name (2 letter code)
    countryName_min = 2
    countryName_max = 2
    commonName = Common Name (hostname, IP, or your name)
    commonName_max = 64
    
    # Default values for the above, for consistency and less typing.
    # Variable name   		  Value
    #------------------------------   ------------------------------
    0.organizationName_default = My Palm Pre
    localityName_default = Phone
    stateOrProvinceName_default = Anywhere
    countryName_default = NA
    
    [ v3_ca ]
    basicConstraints = CA:TRUE
    subjectKeyIdentifier = hash
    authorityKeyIdentifier = keyid:always,issuer:always
    EOF
    
    (echo; echo; echo; echo; echo; echo; echo) | \
    
    	openssl req -new -x509  -config /opt/etc/lighttpd/openssl.cnf \
    
    	-keyout /opt/etc/lighttpd/server.pem -out /opt/etc/lighttpd/server.pem -days 786 -nodes 
    
    mv /opt/etc/lighttpd/lighttpd.conf /opt/etc/lighttpd/lighttpd.conf.original
    
    cat > /opt/etc/lighttpd/lighttpd.conf <<EOF
    
    server.modules              = (
                                    "mod_access",
    				"mod_fastcgi",
                                    "mod_webdav",
                                    "mod_auth",
                                    "mod_accesslog" )
    
    server.document-root        = "/media/internal"
    
    server.errorlog             = "/opt/var/log/lighttpd/error.log"
    
    # files to check for if .../ is requested
    index-file.names            = ( "index.html" )
    
    ## virtual directory listings
    dir-listing.activate        = "enable"
    dir-listing.hide-dotfiles   = "enable"
    
    
    # mimetype mapping
    mimetype.assign             = (
      ".pdf"          =>      "application/pdf",
      ".sig"          =>      "application/pgp-signature",
      ".spl"          =>      "application/futuresplash",
      ".class"        =>      "application/octet-stream",
      ".ps"           =>      "application/postscript",
      ".torrent"      =>      "application/x-bittorrent",
      ".dvi"          =>      "application/x-dvi",
      ".gz"           =>      "application/x-gzip",
      ".pac"          =>      "application/x-ns-proxy-autoconfig",
      ".swf"          =>      "application/x-shockwave-flash",
      ".tar.gz"       =>      "application/x-tgz",
      ".tgz"          =>      "application/x-tgz",
      ".tar"          =>      "application/x-tar",
      ".zip"          =>      "application/zip",
      ".mp3"          =>      "audio/mpeg",
      ".m3u"          =>      "audio/x-mpegurl",
      ".wma"          =>      "audio/x-ms-wma",
      ".wax"          =>      "audio/x-ms-wax",
      ".ogg"          =>      "application/ogg",
      ".wav"          =>      "audio/x-wav",
      ".gif"          =>      "image/gif",
      ".jpg"          =>      "image/jpeg",
      ".jpeg"         =>      "image/jpeg",
      ".png"          =>      "image/png",
      ".xbm"          =>      "image/x-xbitmap",
      ".xpm"          =>      "image/x-xpixmap",
      ".xwd"          =>      "image/x-xwindowdump",
      ".css"          =>      "text/css",
      ".html"         =>      "text/html",
      ".htm"          =>      "text/html",
      ".jsjsjs&$quot$;           =&$gt$;      &$quot$;$text$/$javascript$&$quot$;,
      &$quot$;.$asc$&$quot$;          =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$c$&$quot$;            =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$cpp$&$quot$;          =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$log$&$quot$;          =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$conf$&$quot$;         =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$text$&$quot$;         =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$txt$&$quot$;          =&$gt$;      &$quot$;$text$/$plain$&$quot$;,
      &$quot$;.$dtd$&$quot$;          =&$gt$;      &$quot$;$text$/$xml$&$quot$;,
      &$quot$;.$xml$&$quot$;          =&$gt$;      &$quot$;$text$/$xml$&$quot$;,
      &$quot$;.$mpeg$&$quot$;         =&$gt$;      &$quot$;$video$/$mpeg$&$quot$;,
      &$quot$;.$mpg$&$quot$;          =&$gt$;      &$quot$;$video$/$mpeg$&$quot$;,
      &$quot$;.$mov$&$quot$;          =&$gt$;      &$quot$;$video$/$quicktime$&$quot$;,
      &$quot$;.$qt$&$quot$;           =&$gt$;      &$quot$;$video$/$quicktime$&$quot$;,
      &$quot$;.$avi$&$quot$;          =&$gt$;      &$quot$;$video$/$x$-$msvideo$&$quot$;,
      &$quot$;.$asf$&$quot$;          =&$gt$;      &$quot$;$video$/$x$-$ms$-$asf$&$quot$;,
      &$quot$;.$asx$&$quot$;          =&$gt$;      &$quot$;$video$/$x$-$ms$-$asf$&$quot$;,
      &$quot$;.$wmv$&$quot$;          =&$gt$;      &$quot$;$video$/$x$-$ms$-$wmv$&$quot$;,
      &$quot$;.$bz2$&$quot$;          =&$gt$;      &$quot$;$application$/$x$-$bzip$&$quot$;,
      &$quot$;.$tbz$&$quot$;          =&$gt$;      &$quot$;$application$/$x$-$bzip$-$compressed$-$tar$&$quot$;,
      &$quot$;.$tar$.$bz2$&$quot$;      =&$gt$;      &$quot$;$application$/$x$-$bzip$-$compressed$-$tar$&$quot$;
     )
    
    $accesslog$.$filename$          = &$quot$;/$opt$/$var$/$log$/$lighttpd$/$access$.$log$&$quot$;
    $server$.$port$                = $443$
    $server$.$pid$-$file$            = &$quot$;/$var$/$run$/$lighttpd$.$pid$&$quot$;
    
    $ssl$.$engine$    = &$quot$;$enable$&$quot$;
    $ssl$.$pemfile$   = &$quot$;/$opt$/$etc$/$lighttpd$/$server$.$pem$&$quot$;
    $ssl$.$use$-$sslv2$ = &$quot$;$disable$&$quot$;
    
    $$HTTP$[&$quot$;$url$&$quot$;] =~ &$quot$;^/($|/)&$quot$; {
          $webdav$.$activate$ = &$quot$;$enable$&$quot$;
          $webdav$.$is$-$readonly$ = &$quot$;$disable$&$quot$;
          $webdav$.$sqlite$-$db$-$name$ = &$quot$;/$opt$/$var$/$run$/$lighttpd$/$lighttpd$.$webdav_lock$.$db$&$quot$;
    }
    
    $auth$.$backend$ = &$quot$;$htdigest$&$quot$;
    $auth$.$backend$.$htdigest$.$userfile$ = &$quot$;/$opt$/$etc$/$lighttpd$/.$htdigest$&$quot$;
    
    $auth$.$require$ = ( &$quot$;/&$quot$; =&$gt$; (
                            &$quot$;$method$&$quot$;  =&$gt$; &$quot$;$digest$&$quot$;,
                            &$quot$;$realm$&$quot$;   =&$gt$; &$quot$;$palmpre$&$quot$;,
                            &$quot$;$require$&$quot$; =&$gt$; &$quot$;$valid$-$user$&$quot$;
                            )
                    )
    
    
    # $Configuration$ $from$ $other$ $optware$ $packages$
    $include_shell$ &$quot$;$cat$ /$opt$/$etc$/$lighttpd$/$conf$.$d$/*.$conf$&$quot$;
    
    $EOF$
    
    $mkdir$ -$p$ /$opt$/$var$/$run$/$lighttpd$
    
    $mount$ -$o$ $remount$,$ro$ /
    
    $ipkg$-$opt$ $install$ $php$-$fcgi$
    
    $reboot$
  6. #6  
    How can I remove it so I can re-install with this script. Nothing shows up in PreWare as being installed.

    ** I know I don't have it installed. When I try to install it from the instructions on webos-internals I get the same error about the md5sum mismatch.
    Last edited by cdbillups; 01/14/2010 at 02:05 PM. Reason: updated info
  7. #7  
    oh... i see... you did "ipkg update" as suggested...
    but that's not the correct ipkg

    you need to do "ipkg-opt update"

    the script uses ipkg-opt (from webos-internals)

    try that maybe that updates your local copy of the md5sums
  8. #8  
    Well that got it to install. When I go to it through IE / Firefox I get the "HTTP 404 Not Found" error.
  9. #9  
    Did it tell you at the end

    Installation of WebDAV backends successful.
    Now connect to WebDAV from your PC to the service URL https://HERE-YOUR-IP/
    ????

    did you make sure to write https:// ??? (with the s)

    You can run from ssh this command
    Code:
    netstat -an | egrep "443.*LISTEN"
    it should return something, if it does, then your server is up and running
    (this is what mine returns: tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN)

    if not, and if you executed the whole script, maybe
    Code:
    /opt/etc/init.d/S80lighttpd start
    helps, or try restarting your phone
  10. #10  
    My answers are in red.
    Quote Originally Posted by figus View Post
    Did it tell you at the end

    Installation of WebDAV backends successful.
    Now connect to WebDAV from your PC to the service URL https://HERE-YOUR-IP/
    ????

    did you make sure to write https:// ??? (with the s)

    Yes, in IE it asks me for my username and password. Then displays the 404 error.

    You can run from ssh this command
    Code:
    netstat -an | egrep "443.*LISTEN"
    it should return something, if it does, then your server is up and running
    (this is what mine returns: tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN)
    Mine shows the same thing.
    if not, and if you executed the whole script, maybe
    Code:
    /opt/etc/init.d/S80lighttpd start
    helps, or try restarting your phone
    Rebooted after the install just to be safe. Also tried the above command and it said it was already running.
    Would there be a conflict with WinSCP or something that it uses to connect? I can connect just fine with it.
  11. #11  
    ohhhh, then it's because there's no index file :P, mine showed the same, i thought it didn't even asked for your user and password, that's why I added this lines

    Code:
    index-file.names = ( "index.html", "index.php" )
    dir-listing.activate = "enable"
    dir-listing.hide-dotfiles = "enable"
    The first line specifies the name of the index file (by default just html, that's why i added index.php) (you can skip the first line)

    and the last 2 lines allow directory listing, so if there's no index file, you should see all the directory structure (all the files you see when in usb mode)

    add those in the lighttpd.conf file

    Code:
    /opt/etc/lighttpd/lighttpd.conf
    if you can enter with WinSCP then it should be easy, just Edit the file from there

    I added the lines just after
    Code:
    server.errorlog             = "/opt/var/log/lighttpd/error.log"
  12. #12  
    That did it! Thanks for the help.
  13. #13  
    Quote Originally Posted by cdbillups View Post
    That did it! Thanks for the help.
    You're welcome

    If you can mount the PRE as a Drive in windows (following the guides the OP posted) tell me how you did it , i can't..... , maybe is my windows 7 or maybe because I had a lighttpd from preware.... who knows... xD
  14. #14  
    I haven't found a way to mount it yet. So far all I can do is view it in IE / Firefox. Do you have to give the directory a share name in the config file somewhere?
  15. #15  
    Don't really know... just followed this guide
    How to Map WebDAV folder Under Vista/XP | Windows Reference

    but no success.... too bad, that was the main reason I did all this :P
    anyway, as last option I'm using a PHP File Manager... allows me to upload, download, rename, edit files :P
  16. #16  
    Setting up Web Folders

    That at least got the Web Folder set up. Now I can see anything in the main folder but can't access anything in any subfolders. Is there another command to add to the config file that allows for browsing subfolders?

    I can browse the subfolders (wallpaper, music, etc.) if I just connect to it through IE / Firefox.
    Last edited by cdbillups; 01/14/2010 at 04:28 PM. Reason: clarification
  17. #17  
    managed to mount my Pre through WebDAV but i can only read. I get a error when I try to write to my Pre. what am I doing wrong?
  18. #18  
    maybe write permissions??? if

    chmod 777 folder_name

    works... it was that :P, otherwise.... no idea xD, still can mount :P
  19. #19  
    Quote Originally Posted by figus View Post
    maybe write permissions??? if

    chmod 777 folder_name

    works... it was that :P, otherwise.... no idea xD, still can mount :P
    nope, didn't work
  20. #20  
    I really can't get how to follow the install procedure.

    1) Downloaded the txt file
    2) Copied to the Pre (i.e. /media/internal/)
    3) How to execute the script? If I try for instance with the Linux Commandline from WOSQI, typing "sh /media/internal/<scriptfilename>.txt" freezes the commandline window and nothing happens to be working.

    If you have any suggestion it would be of great help to me.

    TY. Regards
Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions