Every once in a while, I notice that something must have recursively changed all my files' permissions in my home directory to go-rx — so I do:

$ find . -type f -exec chmod go+r {} \;
$ find . -type d -exec chmod go+rx {} \;

to put it back to the way I want it — for a little while until whatever thing changes the permissions again. But what process is periodically changing my file permissions (and how can I stop it)?

  • Why are you hosting a web site from your home directory? – Allan Apr 15 at 16:34
  • Because it's something small that only I maintain. But my reason doesn't matter. If you can actually answer the question (and not second-guess why I'm doing it in a particular way), please do. It it makes it easier for you, just totally forget that I'm running a web site. Consider my question to have been only: "What process is changing my file permissions of my home directory?" – Paul J. Lucas Apr 15 at 17:37
  • Actually it does matter. If you're running a website from your home directory, I'm trying to determine how you've configured httpd.conf, what permissions you've changed to give access to Apache given that the home directory itself has permissions specific to macOS. And if you're executing those chmod commands on your home directory, you're potentially breaking other things and/or macOS is using a higher privileged process to restore the correct ones – Allan Apr 15 at 17:51
  • We can debate what process is doing what (use lsof) but that would be pointless if you decided to make your DocumentRoot your whole home directory. It's a better idea to create a folder just for it and give the appropriate permissions to the web server process. – Allan Apr 15 at 17:53
  • I never said the document root is my whole home directory. I'm allowing ~user directories, the entire point of which is to allow users to serve the own pages. But, again, it doesn't matter. On a different Mac (where I'm not running a web server), presumably the same mystery process is also changing the permissions of my home directory — except there, I don't really care as much since nobody else needs to see files there. But I'd still like to know what that process is and stop it from touching file permissions. – Paul J. Lucas Apr 15 at 18:10

You must log in to answer this question.

Browse other questions tagged .