[SOLVED] Want to access a directory from web via browser

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Want to access a directory from web via browser

Postby mark9117 » Sep 28th, '15, 01:32

I hope this is the right place. If not, please feel free to move it.

I have a directory of recipes I've collected over forever that I would like to share with my adult children. I have that directory on an Internet-facing file server and I can get to it via ssh, ftp and a web browser thanks to a symbolic link in /var/www/html.

I would like something a little more presentable that I could refer the kids to. It has to be a simple point-and-click affair. They could just browse the listing and download the document they wanted. I don't want to have to install a content management system. I had a Drupal installation a few years ago and I didn't do anything with it, therefore, it just sat there unpatched and drew a lot of interesting spam.

I do, however, have a Dokuwiki installation on this server that seems well suited to this kind of thing, except that it doesn't offer a file server that I can get to work. I've installed the filelist and directorylist extensions and neither seems to work as advertised.

I can get the listings to show up with directorylist, but I can't get the links to download because Dokuwiki wants the files to live under the document root of Apache. So, while my documents live in \share\Recipes, Docuwiki reads the symbolic link, "/var/www/html/recipes" and creates the file listing just fine. When you click the link to download, the object under "<document_root>/share/Recipes/<filename>" is not found (error 404).

Is there a solution for this with Dokuwiki? Some way to mount the share so that Docuwiki can actually find the files? Is there some other simple solution short of a CMS that I haven't found?

Thanks much.

Mark
Last edited by mark9117 on Oct 2nd, '15, 01:53, edited 1 time in total.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Want to access a directory from web via browser

Postby wintpe » Sep 28th, '15, 12:10

the apache server has serveral sections in its config file httpd.conf

for example

<Directory "/mypath/mydocs/recipies">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

that change the permissions on an underlying unix directory.

and allow you to browse it in file/directory mode, ie without an index.html

I find twiki is also a much better way of presenting stuff, but you cant just dump files in a directory, you have to add them to a

start page, or a section off a start page.


regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Want to access a directory from web via browser

Postby mark9117 » Sep 28th, '15, 19:26

Thanks for the tip wintpe . I'm familiar with Apache's ACL's but just barely. I don't think that's the issue with Dokuwiki. It's simply starting at the document root of Apache, consequently the path to my recipes is incorrect. I'm thinking that mounting that file system in a different place (specifically under /var/www/html/recipes) may resolve the issue, but I was too brain dead to sort that out yesterday when I posted this. I'll have to try it and verify whether it works without breaking anything.

Also, I'm at work now but will try to take a look at twiki when I get a chance.

Mark
Last edited by doktor5000 on Sep 29th, '15, 02:08, edited 1 time in total.
Reason: removed fullquote
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Want to access a directory from web via browser

Postby doktor5000 » Sep 29th, '15, 02:08

Please next time do not use fullquotes, but only use the Reply function. Greatly improves clarity and reading flow ;)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Want to access a directory from web via browser

Postby jiml8 » Sep 30th, '15, 06:12

Take a look at https://owncloud.com/. This is the perfect way to share files among family and friends.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Want to access a directory from web via browser

Postby doktor5000 » Oct 1st, '15, 01:37

And the installation instructions are in our wiki, just recently put it up: https://wiki.mageia.org/en/OwnCloud
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Want to access a directory from web via browser

Postby mark9117 » Oct 1st, '15, 02:08

Nope. Been there done that. I wanted something even simpler. Found an open source php solution.

Http://adams-lan.blogdns.org/recipes

Now I just need to learn enough about css to build a more legible theme.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Want to access a directory from web via browser

Postby jiml8 » Oct 1st, '15, 10:07

Without downloading and studying that script, I cannot comment knowledgeably, but...

I suggest you look carefully at what security is employed in that script to prevent it from being used to crack your system. PHP is notoriously insecure; developers have to take specific pains to make it secure, and many developers don't bother.

I know that Owncloud goes to considerable lengths to maintain security. I don't know about this script.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Want to access a directory from web via browser

Postby mark9117 » Oct 1st, '15, 22:20

That did occur to me. I did download the code and look through it. That's irrelevant because I don't know enough php to recognize a gaping security hole if I fall through it. I did, however, look through the support listings and while I don't speak Arabic, I did not see anyone raising flags.

Having said all that, I know it's likely to be a damn sight more secure than a php solution I cobbled together myself from boilerplate on the web.

Thanks for the heads up. I'm sticking with this and working with ACL's in Apache's config until I see otherwise.

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Want to access a directory from web via browser

Postby mark9117 » Oct 2nd, '15, 00:56

Okay, I got curious and checked out OwnCloud again. I must say I am impressed. This little app has come a long way since I last implemented it a couple of years ago.
I have an owncloud server running under https and it looks really useful. Hopefully, it won't turn into a nagging maintenance sink like Drupal eventually did.

Going to mark this one "solved".

Mark
https://adams-lan.blogdns.org/owncloud
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest