WebFaction
Community site: login faq
0
1

I know how to set permissions for an extra user to a webapp, but what do I need to do to set permissions two or three directory levels below that?

asked 31 Mar '12, 18:37

cboehner
122
accept rate: 0%


Instead of giving the user rwx permission on the app directory, only give him --x there, and on any other directories above the directory you actually want to share (execute permission on directories is what allows you to traverse the directory to get to stuff below it).

For example, if you want to share /home/you/webapps/yourapp/some/other/dir with "bob":

setfacl -m u:bob:--x $HOME
setfacl -R -m u:bob:--- $HOME/webapps/*
setfacl -R -m u:bob:--x $HOME/webapps/yourapp
setfacl -R -m u:bob:--x $HOME/webapps/yourapp/some
setfacl -R -m u:bob:--x $HOME/webapps/yourapp/some/other
setfacl -R -m u:bob:rwx $HOME/webapps/yourapp/some/other/dir
setfacl -R -m d:u:bob:rwx $HOME/webapps/yourapp/some/other/dir
setfacl -R -m d:u:you:rwx $HOME/webapps/yourapp/some/other/dir
chmod g+s $HOME/webapps/yourapp/some/other/dir
permanent link

answered 31 Mar '12, 19:05

seanf
12.2k42136
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:

×64

question asked: 31 Mar '12, 18:37

question was seen: 3,052 times

last updated: 31 Mar '12, 19:05

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 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