Skip to main content

Posts

Showing posts from June, 2013

Drupal and file permissions challenges when using selinux

Twice now I've run into this class of problem and so I'm documenting it here for my future self and anyone else with a similar problem. Most recently, a server I manage was generating a rather baffling error, seemlingly randomly Warning: file_put_contents(temporary:///.htaccess) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_create_htaccess() (line 498 of /[documentroot]/includes/file.inc). Baffling because apache (and pretty much any other process on a linux server) has access to read and write to the /tmp directory, and extra baffling because the file was there, created. It seemed to be mostly when editing, but not uniquely. After doing a stack trace, I discovered this about file management in Drupal: As a security measure, Drupal checks for an .htaccess file in all directories it writes to. That includes the temporary directory [which is good, because sometimes that directory is ins

Blame or Responsibility? Point the finger!

Would you rather get blamed, or held responsible for something? When something bad happens, I notice that there often replies about the importance of taking responsibility and frequent rebuttals about not pointing the finger or blaming. But hold on, what exactly is the difference? According to Wikipedia (for example), blame can be defined as the act of holding responsible. Certainly, in usage, you'll see that blame is usually given, and responsibility is more often taken, but I'd say those are just tricks of language -- I can accept blame for myself and hold others responsible just as well. So I'd like to stop pretending that this is a real difference. You may have some clever way of distinguishing between them, but for the average person, the only difference is one of implicit value (responsible = good, blame = bad), and that really doesn't help us at all when it comes to public debate or private argument. Okay, so I'm not so naive as to think it's all