WebFaction
Community site: login faq

Hi,

I want to serve some static files uploaded by an auxiliary login that only has SFTP access. Let's say my main user is called UA, the secondary sftp-only UB, and they both belong to a group GX

In my /home/UA/webapps/static, I've symlinked a folder /home/UB/myfolder. The folder and the symlink belong to GX. When the user uploads files to my folder, they appear correctly under UA/webapps/static/myfolder, but when I try to see them as http://static.mydomain.com/myfolder , I get a 403.

Where am I going wrong ?

asked 10 Jan '14, 02:15

toyg
235
accept rate: 0%


Our Nginx server is configured to serve a 403 for any symlinks that point to a location outside of your main account home directory.

The workaround is to go the other direction with your symlink, eg:

  • Create /home/UA/webapps/static/myfolder as a normal directory
  • Give UB access to that directory.
  • Create /home/UB/myfolder as a symlink to /home/UA/webapps/static/myfolder

Hope that helps!

permanent link

answered 10 Jan '14, 19:31

seanf
12.2k41836
accept rate: 37%

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:

×125
×64
×37
×31
×3

question asked: 10 Jan '14, 02:15

question was seen: 1,635 times

last updated: 10 Jan '14, 19:31

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