Lighthttp Share Specific Folder
Forum » Forum / Network Access » Lighthttp Share Specific Folder
started by: OutrageouS90OutrageouS90
on: 1205061295|%e %b %Y, %H:%M %Z|agohover
number of posts: 6
rss icon RSS: new posts
summary:
How to only share like /PUBLIC/ONLYSHARETHIS
Lighthttp Share Specific Folder
OutrageouS90OutrageouS90 1205061295|%e %b %Y, %H:%M %Z|agohover

I dont want to share the whole public directory. only the folder in it. How can i do this?

unfold Lighthttp Share Specific Folder by OutrageouS90OutrageouS90, 1205061295|%e %b %Y, %H:%M %Z|agohover
Re: Lighthttp Share Specific Folder
MaxeyMaxey 1205099842|%e %b %Y, %H:%M %Z|agohover

See: http://martin.hinner.info/mybook/lighttpd.php

In step 1 replace the command
ln -s /shares/internal/PUBLIC /usr/www/lib/
into
ln -s /shares/internal/PUBLIC/ONLYSHARETHIS /usr/www/lib/

Hopes this helps,

Max

unfold Re: Lighthttp Share Specific Folder by MaxeyMaxey, 1205099842|%e %b %Y, %H:%M %Z|agohover
Re: Lighthttp Share Specific Folder
alephsmithalephsmith 1205101691|%e %b %Y, %H:%M %Z|agohover

Or if you want to share multiple folders in PUBLIC:

# ln -s /shares/internal/PUBLIC/SHARE1 /usr/www/lib/SHARE1

# ln -s /shares/internal/PUBLIC/SHARE2 /usr/www/lib/SHARE2

You can then access the respective shares at:
http://mybookworld/SHARE1 & http://mybookworld/SHARE2

unfold Re: Lighthttp Share Specific Folder by alephsmithalephsmith, 1205101691|%e %b %Y, %H:%M %Z|agohover
Re: Lighthttp Share Specific Folder
khoshkhosh 1210623104|%e %b %Y, %H:%M %Z|agohover

I'm only getting a "404 Not found" when I try to access http://<MyBookIPaddress>/PUBLIC. I followed the guide to lighthttp on Martin Hinner's page (and there wasn't much to follow…) :)

Is there something I'm missing? It's worth mentioning that I'm not a Unix-whiz, so dummie-explenations are welcome :)

unfold Re: Lighthttp Share Specific Folder by khoshkhosh, 1210623104|%e %b %Y, %H:%M %Z|agohover
Re: Lighthttp Share Specific Folder
alephsmithalephsmith 1210630585|%e %b %Y, %H:%M %Z|agohover

Have you restarted lighttpd?

Other than that, how about posting your lighttpd.conf and the output of:

ls -lah /usr/www/lib/
unfold Re: Lighthttp Share Specific Folder by alephsmithalephsmith, 1210630585|%e %b %Y, %H:%M %Z|agohover
Re: Lighthttp Share Specific Folder
khoshkhosh 1212337712|%e %b %Y, %H:%M %Z|agohover
[root@MYBOOKNAME etc]# ls -lah /usr/www/lib
total 240K
drwxr-xr-x 6 root root 4.0K May 12 23:08 .
drwxr-xr-x 5 root root 4.0K Jan 18 13:44 ..
-rwxr-xr-x 1 root root 4.9K Jan 18 13:44 MBUI.css
lrwxrwxrwx 1 root root   29 May 12 23:08 Music -> /shares/internal/PUBLIC/Music
lrwxrwxrwx 1 root root   23 May 11 21:23 PUBLIC -> /shares/internal/PUBLIC
-rwxr-xr-x 1 root root 3.9K Jan 18 13:44 Permission.pm
drwxr-xr-x 2 root root 4.0K Jan 18 13:44 Service
drwxr-xr-x 2 root root 4.0K Jan 18 13:44 Session
-rwxr-xr-x 1 root root  692 Jan 18 13:44 SysCmd.pm
-rwxr-xr-x 1 root root 1.5K Jan 18 13:44 ajax.js
-rwxr-xr-x 1 root root  18K Jan 18 13:44 cnNasLanguage.pm
-rwxr-xr-x 1 root root  23K Jan 18 13:44 deNasLanguage.pm
-rwxr-xr-x 1 root root   69 Jan 18 13:44 error-401.html
-rwxr-xr-x 1 root root  23K Jan 18 13:44 esNasLanguage.pm
-rwxr-xr-x 1 root root  24K Jan 18 13:44 frNasLanguage.pm
drwxr-xr-x 5 root root 4.0K Jan 18 13:44 images
-rwxr-xr-x 1 root root  22K Jan 18 13:44 itNasLanguage.pm
drwxr-xr-x 2 root root 4.0K Jan 18 13:44 nas
-rwxr-xr-x 1 root root  13K Jan 18 13:44 nasCommon.pm
-rwxr-xr-x 1 root root 8.8K Jan 18 13:44 nasCore.pm
-rwxr-xr-x 1 root root  19K Jan 18 13:44 nasLanguage.pm
-rwxr-xr-x 1 root root 9.5K Jan 18 13:44 nasMaster.pl
-rwxr-xr-x 1 root root 1.2K Jan 18 13:44 oxnas.css
-rwxr-xr-x 1 root root 1.1K Jan 18 13:44 removeExternalShares.pl
-rwxr-xr-x 1 root root   26 Jan 18 13:44 robots.txt
-rwxr-xr-x 1 root root 1.9K Jan 18 13:44 validate.js

lighttpd.conf:

server.document-root = "/usr/www/lib/"
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = "/var/log/lighttpd/error.log"

dir-listing.activate = "enable"

server.port = 80

server.username = "www-data"
server.groupname = "www-data"

server.modules          = (
                            "mod_auth",
                            "mod_access",
                            "mod_alias",
                            "mod_cgi",
                            "mod_fastcgi",
                            "mod_accesslog"
)

server.errorfile-prefix = "/usr/www/lib/error-"

mimetype.assign = (
  ".html" => "text/html",
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png",
  ".gif" => "image/gif",
  ".css" => "text/css"
)

#accesslog.filename = "/var/log/lighttpd/access.log"

static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc", ".cgi" )
index-file.names = ( "nasMaster.pl" )

# bruce - I don't think we need this now...
#cgi.assign                 = ( ".cgi"  => "/usr/bin/perl" )

alias.url = ( "/auth" => "/usr/www/lib" )

auth.backend               = "htdigest"
auth.backend.htdigest.userfile = "/var/private/lighttpd.htdigest.user"
auth.require               = ( "/auth" =>
                               (
                                  "method"  => "digest",
                                  "realm"   => "nas admin",
                                  "require" => "valid-user"
# bruce - removed user=
#                                  "require" => "user=admin"
                               )
)

fastcgi.debug = 0

# Bruce - Removed host & port and replaced with a socket
# "host" => "127.0.0.1",
# "port" => 1026,
fastcgi.server = ( ".pl" =>
    (( "socket" => "/tmp/lighttpd.fcgi.socket",
       "bin-path" => "/usr/www/lib/nasMaster.pl",
       "check-local" => "disable",
       "min-procs" => 1,
       "max-procs" => 1,
       "idle-timeout" => 30,
       "bin-environment" => (
                # Environment variables for nasMaster.pl
                "PERL5LIB" => "/usr/www/lib",
                "NAS_NBIN" => "/usr/www/nbin",
       ),
    )),
        "nasMaster.pl" => ((  "socket" => "/tmp/lighttpd.fcgi.socket",
                "check-local" => "disable",
        ))
)

I think I solved a part of the problem. When I try to access browser listing I enter my ip-address. But that leads the browser to my adsl modem and router's login screen. How do I bypass or bridge this so the router leads the "visitor" to my network drive? This would be configuration on the router, not the mybook. I'm using an A-link RR24AP.

unfold Re: Lighthttp Share Specific Folder by khoshkhosh, 1212337712|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License