File permissions - how to "lock" a directory

Paul Schmehl pschmehl_lists at
Sat Sep 29 21:41:15 UTC 2012

I have a particularly thorny problem I'm trying to solve, but I'll bet 
FreeBSD has a solution.

I'm running a webserver using suphp.  It's very picky about permissions. 
It wants the web server user (www) to be the owner of all directories and 

Meanwhile, the site owners want to be able to update and add files to the 
site.  When they update files everything is fine.  When they upload new 
files, the ownership of the file is user:user instead of www:user, so 
apache can't display them.

Is there a way to "lock" a directory such that all files created in that 
directory are owned by the directory owner?  If not, I'll have to script 
something to change perms after uploads.

Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell

More information about the freebsd-questions mailing list