WebFaction
Community site: login faq

I have a bunch of media files located at ~/webapps/mywordpress/wp-content/uploads

I have created a symlink to static-only app that points to that uploads folder, and I have mounted it at mydomain.com/wp-content/uploads

I know this gives me a speed boost by calling the media files through Nginx instead of the PHP interpreter. But does the symlink also provide security by preventing any executable files from being executed in ~/webapps/mywordpress/wp-content/uploads?

In other words, does having the "symlink to static-only app" provide the same security as an .htaccess file in the same directory that disables executables?

asked 31 Mar '14, 18:02

PeterA
10431021
accept rate: 14%


Yes, a symlink app does provide additional security in this sense - i.e., items on a path served directly by the front-end Nginx server will be served statically, and not be executed as scripts.

permanent link

answered 31 Mar '14, 18:11

seanf
12.2k31836
accept rate: 37%

Thanks Sean! Would this also protect against the risks created when a WordPress plugin creates folders with 777 permissions (inside ~/webapps/mywordpress/wp-content/uploads)?

(31 Mar '14, 18:16) PeterA

It will protect against the risk of a script being executed via the web. It won't protect against any other risks inherent to insecure file/directory permissions.

(31 Mar '14, 18:34) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×243
×75
×69
×12
×2

question asked: 31 Mar '14, 18:02

question was seen: 1,338 times

last updated: 31 Mar '14, 18:34

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM