[TriLUG] Apache sharing files out of a samba share

David McDowell turnpike420 at gmail.com
Wed Jul 13 16:04:48 EDT 2005


I'm not sure I follow... here's more:

http://www.example.com/viewfiles.php for example can list the files
from /mnt/mysharename b/c PHP can access the file system.  The web
server has NO rights to /mnt/mysharename so the web URL for a file
can't be http://www.example.com/myfirstfile.pdf and it can't be
http://www.example.com/mnt/mysharename/myfirstfile.pdf.  Those just
don't make sense.  Does Apache need a directive that puts
/mnt/mysharename as a valid web directory, or an alias folder in
/var/www/html/ or some other method?

hope that helps more,
thanks!
David McD


On 7/13/05, John Berninger <johnw at berningeronline.net> wrote:
> On Wed, 13 Jul 2005, David McDowell wrote:
> 
> > We are building an app with apache/php that will allow users to upload
> > and download files.  I'd like to store the files on my Win fileserver
> > to make backups easier, the linux box attaches to the share at
> > /mnt/mysharename and works great with PHP displaying the directory
> > contents to a web user, however, I can't actually "link" to the file
> > that way, or am doing so incorrectly.
> >
> > What is recommended?  mount to a different point, an alias to the mnt
> > point from Apache, a different/new directive in httpd.conf??
> 
>        Take a look at the readfile() command in PHP - create a wrapper
> that does some sanity checking, then readfile()'s a filename based on
> URL or parameters.
> 
> >
> > thanks,
> > David McD
> > --
> > TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> > TriLUG Organizational FAQ  : http://trilug.org/faq/
> > TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> > TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
> >
> >
> 
> --
> John Berninger
> 
> GPG Key ID: A8C1D45C
>        Fingerprint: B1BB 90CB 5314 3113 CF22  66AE 822D 42A8 A8C1 D45C
> 
> Ita erat quando hic adveni.
> --
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
>



More information about the TriLUG mailing list