7 Replies - 583 Views - Last Post: 26 March 2018 - 09:10 AM

#1 Foobarer   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 269
  • Joined: 28-March 17

Where to place the uploaded images folder?

Posted 24 March 2018 - 12:36 PM

In my test environment the uploaded images are stored inside the root folder with an .htaccess to protect it from being accessed, but I was suggested to move it outside root. In my live environment I am using Ubuntu 14.04 / 16.04 LAMP stack - where should I place the images folder?

**EDIT: If my web files are in 'var/www/html' will it be OK to place it in 'var/www'? (only 1 folder up, yet out of the root)

Thanks

This post has been edited by Foobarer: 24 March 2018 - 12:59 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Where to place the uploaded images folder?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15262
  • View blog
  • Posts: 61,152
  • Joined: 12-June 08

Re: Where to place the uploaded images folder?

Posted 24 March 2018 - 01:25 PM

Typically I have a folder called "images".
Was This Post Helpful? 1
  • +
  • -

#3 Foobarer   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 269
  • Joined: 28-March 17

Re: Where to place the uploaded images folder?

Posted 24 March 2018 - 04:18 PM

My images are also stored inside "images" folder, but currently it's in the root folder, but I saw it's better to move it outside of root somewhere else in the Linux system
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15262
  • View blog
  • Posts: 61,152
  • Joined: 12-June 08

Re: Where to place the uploaded images folder?

Posted 24 March 2018 - 08:33 PM

Why? It's just a folder of images. Nothing more complex than a folder of CGI scripts, CSS, or JS.
Was This Post Helpful? 0
  • +
  • -

#5 Radius Nightly   User is offline

  • D.I.C Regular

Reputation: 39
  • View blog
  • Posts: 321
  • Joined: 07-May 15

Re: Where to place the uploaded images folder?

Posted 25 March 2018 - 02:41 AM

View PostFoobarer, on 24 March 2018 - 08:36 PM, said:

Where to place the uploaded images folder?

View Postmodi123_1, on 24 March 2018 - 09:25 PM, said:

Typically I have a folder called "images".

:dontgetit:

This post has been edited by Radius Nightly: 25 March 2018 - 02:42 AM

Was This Post Helpful? 1
  • +
  • -

#6 Foobarer   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 269
  • Joined: 28-March 17

Re: Where to place the uploaded images folder?

Posted 25 March 2018 - 04:32 AM

Haha that was funny but maybe modi accidentally skipped the word folder or my question was weird :bananaman:

The problem is, whenever I look for something, I encounter many more advice. For example I looked for an image uploading script, and encountered a post saying it shouldn't be stored in root because an attacker can access it. Obviously my website isn't something like Facebook that needs to secure its content of billions of users, I just think it's good to stick with good security practice even if I'm a really inexperienced
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15262
  • View blog
  • Posts: 61,152
  • Joined: 12-June 08

Re: Where to place the uploaded images folder?

Posted 25 March 2018 - 08:37 AM

I mean I get it. .if you want a separate folder for uploads versus the static images for the site - rock and roll.. but again - it's an image. You can lock out access with htaccess and be done with it.
Was This Post Helpful? 1
  • +
  • -

#8 Foobarer   User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 269
  • Joined: 28-March 17

Re: Where to place the uploaded images folder?

Posted 26 March 2018 - 09:10 AM

You're right I worry too much about these stuff
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1