Date: Sat, 29 Sep 2012 17:13:44 -0500 From: Paul Schmehl <pschmehl_lists@tx.rr.com> To: Adam Vande More <amvandemore@gmail.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: File permissions - how to "lock" a directory Message-ID: <FDA9ED5BFE697FA1CAA5B106@Pauls-MacBook-Pro.local> In-Reply-To: <CA%2BtpaK0dmwUpRkN6bNEsUqk-9Nsg2q8vOK6GBF3u7tcqZZ3_XA@mail.gmail.com> References: <6B256EAE618B4A87F4D57217@Pauls-MacBook-Pro.local> <CA%2BtpaK0dmwUpRkN6bNEsUqk-9Nsg2q8vOK6GBF3u7tcqZZ3_XA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--On September 29, 2012 4:59:50 PM -0500 Adam Vande More=20 <amvandemore@gmail.com> wrote: > On Sat, Sep 29, 2012 at 4:41 PM, Paul Schmehl <pschmehl_lists@tx.rr.com> > wrote: > > > 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. =C2=A0It's very picky about = permissions. > It wants the web server user (www) to be the owner of all directories and > files. > > Meanwhile, the site owners want to be able to update and add files to the > site. =C2=A0When they update files everything is fine. =C2=A0When 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? =C2=A0If not, I'll have to = script > something to change perms after uploads. > > > There is the suiddir option, see mount(8) and=C2=A0chmod(2). > Thanks, Adam. I see now I didn't read chmod(1) closely enough. I'm now=20 using 4770 for directories, and I hope this will solve the problem. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FDA9ED5BFE697FA1CAA5B106>