Make a directory listing public?


Recommended Posts

Not sure if this is a practical idea, but I thought it would be nice if I could get the unRAID box to periodically "push" a list of files (contents) to a web page of my choosing.

 

Let's say, for example, I have website.com on a Linux box with a page called music located at www.website.com/music. I'd like to be able to have unRAID send a listing of my Movies share to that web page somehow (using rsync maybe?). This would enable me to see/show a full list of my movies from remote locations, without having to expose the unRAID box to the internet with a web server.

 

The idea is just to see the list, not actually stream any of them. Is this a crazy idea, or has anyone seen or heard of such a script or know an easy way to accomplish this? Or would it be easier to access the unRAID box from outside by putting it into the DMZ on the router, or using port forwarding?

Link to comment

Not sure if this is a practical idea, but I thought it would be nice if I could get the unRAID box to periodically "push" a list of files (contents) to a web page of my choosing.

 

Let's say, for example, I have website.com on a Linux box with a page called music located at www.website.com/music. I'd like to be able to have unRAID send a listing of my Movies share to that web page somehow (using rsync maybe?). This would enable me to see/show a full list of my movies from remote locations, without having to expose the unRAID box to the internet with a web server.

 

The idea is just to see the list, not actually stream any of them. Is this a crazy idea, or has anyone seen or heard of such a script or know an easy way to accomplish this? Or would it be easier to access the unRAID box from outside by putting it into the DMZ on the router, or using port forwarding?

unless you are an expert in security (and since you are asking this question, you most definitely are NOT an expert) you will not be able to secure your unRAID server.  Do not put it in the DMZ zone of your router... it will be hacked... guaranteed.

 

To get a listing of files is as easy as

echo "<pre>"  > /boot/movies.html

cd /mnt/user

ls Movies  >> /boot/movies.html

 

you can then move the file from the flash drive root folder (/boot on linux) to your external site in whatever way they support.    The name of your "Movies" share will need to match that used in the "ls" command.  If your share is lower case, use lower case in the "ls" command, if mixed case, use mixed case.

If it has any special characters or spaces, use quote marks around the name or backslashes before the special characters like this:

ls "my movies" >>/boot/movies.html

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.