WebFaction
Community site: login faq

Hi,

I'm trying to add a new FTP user with access to a specific folder within a webapp (so not the entire webapp itself). I followed instruction as described in this article: http://docs.webfaction.com/software/general.html#granting-access-to-specific-users

The commands I executed are:

setfacl -m u:FTP_USER:--x $HOME
setfacl -m u:FTP_USER:--- $HOME/webapps/*
setfacl -R -m u:FTP_USER:rwx $HOME/webapps/my_application/ACCESSABLE_FOLDER
setfacl -R -m d:u:FTP_USER:rwx $HOME/webapps/my_application/ACCESSABLE_FOLDER
chmod g+s $HOME/webapps/my_application/ACCESSABLE_FOLDER
setfacl -R -m d:u:primary_username:rwx $HOME/webapps/my_application/ACCESSABLE_FOLDER

I then created the symlink for the FTP_USER:

ln -s /home/MAIN_USER/webapps/my_application/ACCESSABLE_FOLDER ~/ACCESSABLE_FOLDER

Now, when I log in with the FTP user, I see the link to ACCESSABLE_FOLDER, but it gives me a "550 Failed to change directory" error. It seems somehow the folder isn't accessable after executing the ommands?

asked 20 Mar '13, 06:34

Mediaweb
312
accept rate: 0%

To be clear: I do not want the FTP_USER to be able to modify anything outside the $HOME/webapps/my_application/ACCESSABLE_FOLDER folder

(20 Mar '13, 07:04) Mediaweb

Traversal through a directory requires execute permission, so you need to give your FTP user execute permission on /home/MAIN_USER/webapps/my_application, eg:

setfacl -m u:FTP_USER:--x $HOME/webapps/my_application
permanent link

answered 20 Mar '13, 11:10

seanf
12.2k31836
accept rate: 37%

That worked, cheers!

(20 Mar '13, 11:22) Mediaweb
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:

×62
×31
×11
×6

question asked: 20 Mar '13, 06:34

question was seen: 5,570 times

last updated: 20 Mar '13, 11:24

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