Project

General

Profile

configure lighhtp for iPhone app

Added by anders over 15 years ago

Hi,

First let me say that I'm quit a newbie to server things but not to programming in general,
so I need some help to configure lighhtpd.

I have built and added lighhttp to my iPhone app to add support for WebDAV.
The WebDAV feature is the only thing I need from lighhttpd.

In the plugin-static.h file I have added:
PLUGIN_INIT(mod_dirlisting)
PLUGIN_INIT(mod_staticfile)
PLUGIN_INIT(mod_auth)
PLUGIN_INIT(mod_webdav)

I can start the server and when logging in to my iPhone app using WebDAV from the Mac OS X Finder,
I can view files and directories in my applications document folder, I can create new directories
but when trying to upload any files, the Mac Finder gives the following error message:

"The operation cannot be completed because you do not have sufficient privileges for some of the items"

As I understand this an authorization problem, the server isn't configured correctly and I need some help to set up the config file correctly.

So far I have what's below. I guess I need help with the auth.xxx settings.
For my particular needs, it would be OK that no authorization is needed, meaning anyone should be able log in
without password or whatever.

Any help appreciated,
Anders

##################################################

#config file

server.tag = "MyApp"
server.port = 8080
server.document-root = "/var/mobile/Applications/MyApp/Documents"
server.upload-dirs = "/var/mobile/Applications/MyApp/Documents"

#aut

auth.debug = 0
auth.backend = "htdigest"
auth.backend.htdigest.userfile = ?

#dir listings

dir-listing.activate = "enable"
dir-listing.hide-dotfiles = "enable"
dir-listing.encoding = "UTF-8"
dir-listing.show-header = "disable"
dir-listing.hide-header-file = "disable"
dir-listing.show-readme = "disable"
dir-listing.hide-readme-file = "disable"

  1. WebDAV

webdav.activate = "enable"
webdav.sqlite-db-name = "/private/var/mobile/Applications/MyApp/tmp/lighttpd.webdav_lock.db"
webdav.log-xml = "disable"


Replies (4)

RE: configure lighhtp for iPhone app - Added by Albright over 15 years ago

Try adding:

webdav.is-readonly = "disable" 

Also make sure the user that Lighty is running as has write permissions to the directory.

RE: configure lighhtp for iPhone app - Added by anders over 15 years ago

Try adding:

webdav.is-readonly = "disable"

I already have that set

Also make sure the user that Lighty is running as has write permissions to the directory.

lighttpd is running on the iPhone and the app has write permissions to the
server.document-root = "/var/mobile/Applications/MyApp/Documents" folder
Doesn't this mean that anyone logging in also have permissions?

Do you mean the user on the remote computer needs permission?

Can you explain more?

RE: configure lighhtp for iPhone app - Added by Albright over 15 years ago

The web server itself needs read/write permission to the directory.

But I'm also noting that you say you don't want any sort of authentication for this, but you have auth directives in that config file. Try removing or commenting out those lines.

I can't pretend to be an expert at Lighty running on an iPhone, though - I'm surprised you got this far, frankly.

RE: configure lighhtp for iPhone app - Added by jonee over 15 years ago

Hi anders, I am also newbie here, struggling with the similar problem, and I need WebDAV support in my iphone app for data backup, can you please guide me from where should I start to enable that using lighthttpd.
Thanks in advance

    (1-4/4)