Wordpress on NAS to access user files on NAS

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
goatgrab
New here
Posts: 8
Joined: Mon Jan 02, 2017 6:03 pm

Wordpress on NAS to access user files on NAS

Post by goatgrab »

I have a successful installation of Wordpress on my NAS and all works fine as it is meant to. I have wanted to exploit the functionality of Wordpress and my NAS by allowing me to build local pages/posts that have access to the vast resources I have on other parts of the NAS (my Documents, Audio, Video and other files) without copying them all inefficiently into Wordpress's storage/directory structure. I have already uploaded a few to see if there was already a mod to eliminate this real file copy step, and no, just like the normal Wordpress, it copies the whole file into it's own structure.

It seems that all I need to achieve is a relative or explicit URL that will access these files on other parts of the NAS - or will Appache not know what to do with it when handling? Is there a mod to Wordpress, Apache or an adjustment anywhere else that would allow this to work? Has anyone done it?
ensignvorik
Easy as a breeze
Posts: 365
Joined: Sat Jul 14, 2012 8:24 pm

Re: Wordpress on NAS to access user files on NAS

Post by ensignvorik »

what is it you're trying to achieve? There may already be official or unofficial apps that do it for you?

Do you need to access your files externally?
Unless I'm being blind, I can't find the setting to change what kind of QNAP I have on my profile. I now own a TS-253A
goatgrab
New here
Posts: 8
Joined: Mon Jan 02, 2017 6:03 pm

Re: Wordpress on NAS to access user files on NAS

Post by goatgrab »

Hi ensignvorik,

Sorry I did not see the reply as I thought I'd be notified.

This is not for files externally... I have been frustrated with most of the Media players that seem to be less flexible, whereas with a Wordpress app, I can customise it in so many ways. I'm not keen to dive into under the covers QNAP code, but Wordpress/PHP and DB etc. is designed for user customisation, so safe. All I would need is to know how/if the real URL to get to my files is a possibility. In some ways it is a creative outlet and also allowing me to run/use a Media interface that I can control and develop in this environment.

If there are flexible interface apps around, then that is a possibility. The descriptions are a bit lacking. I've been resistant to install something called Twonky as this doesn't sound good, but I could be wrong.
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: Wordpress on NAS to access user files on NAS

Post by Moogle Stiltzkin »

goatgrab wrote:I have a successful installation of Wordpress on my NAS and all works fine as it is meant to. I have wanted to exploit the functionality of Wordpress and my NAS by allowing me to build local pages/posts that have access to the vast resources I have on other parts of the NAS (my Documents, Audio, Video and other files) without copying them all inefficiently into Wordpress's storage/directory structure. I have already uploaded a few to see if there was already a mod to eliminate this real file copy step, and no, just like the normal Wordpress, it copies the whole file into it's own structure.

It seems that all I need to achieve is a relative or explicit URL that will access these files on other parts of the NAS - or will Appache not know what to do with it when handling? Is there a mod to Wordpress, Apache or an adjustment anywhere else that would allow this to work? Has anyone done it?
i succeeded doing this in the past. in wordpress there are download plugins which basically lets you add a page with download links. you then can add a direct pathing to the folder containing the media you want to link/share.

what this then does it not requiring to keep a separate copy of those files under wordpress, instead it links directly. i tested it myself so it definitely works.

the only problem though is what is the best method to obfusticate your download links so people cannot browse the root of that directory to download whatever you did not intentionally link. also to protect your links from being used off site (basically other sites leeching off your resources and bandwidth and acting as if they are the source).

but i'm sure by now there must be more additional plugins that solves that as well :X but i hadn't looked lately but i do know such scripting is possible.

PS: if your running website accessible online always make sure your qnap firmware is using latest stable especially the ones listed in security bulletin as high to critical risk requiring patching. if your using apache you may want to setup htaccess/php config with proper security configurations to avoid a vulnerable webserver insufficiently configured.



o forgot to mention. another method is to just generate download/shared links using filestation. you can then append a password to it if you wish as well as an expiration timer (or not). then you can simply link and people can click those download direct. you have full control to managed those shared links from filestation later.


the last method is just issuing ftp access. people can access to ftp to browse a specific directory with all the content. basically you setup a separate account with limited ftp access to specified root folder of your choosing, so only thing they can do is download only from there. basic access credentials required username/password.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Wordpress on NAS to access user files on NAS

Post by schumaku »

Oh well, the Apache developers did everything so accessing data off the httpd root is not possible ... and then Web App and plugin makers override this again. Of course, this can make sense to achieve certain Web App functionality ... but htis must be done with the max possible care required.
goatgrab
New here
Posts: 8
Joined: Mon Jan 02, 2017 6:03 pm

Re: Wordpress on NAS to access user files on NAS

Post by goatgrab »

Thanks Moogle Stiltzkin - this is great infrmation and I have tested it already and it works for what I wanted to achieve. It was under my nose, but not expecting it. This is great news and thanks for the thoroughness of your message incl security, and from schumaku also for security notes.
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”