WebFaction
Community site: login faq

How can I force ACLs to be inherited when the parent directory when a new file is created?

For instance, if I do: setfacl -R -m u:apache:r-x ~/webapps/appname/ touch ~/webapps/appname/test.html

I'd expect test.html to have the same ACLs as /appname/ - but it doesn't. So, if I want it to be readable by apache or nginx, it seems that I'd need to run setfacl again, which seems... wrong.

What am I missing?

asked 09 Jan '11, 16:41

kgrin
313
accept rate: 0%


Instead of:

setfacl -R -m u:apache:r-x ~/webapps/appname/

Use:

setfacl -R -m d:u:apache:r-x ~/webapps/appname/

From Granting Access to Specific Users:

Additionally, if u is prepended with default: or d: and path is a directory, any new files created by that or any other user within path will default to those permissions.

permanent link

answered 09 Jan '11, 16:55

aaronh ♦♦
1.3k3
accept rate: 34%

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:

×11
×7

question asked: 09 Jan '11, 16:41

question was seen: 2,224 times

last updated: 09 Jan '11, 16:55

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