Closed
Bug 553615
Opened 15 years ago
Closed 15 years ago
plugins.stage.mozilla.com permissions issue writing to logs AND cache clear
Categories
(mozilla.org Graveyard :: Server Operations, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ozten, Assigned: fox2mike)
References
()
Details
Please clear the application cache for plugins.stage.mozilla.com. (memcache probably)
Also, the same permissions issue that was fixed yesterday is back today.
file_put_contents( /data/www/plugins.stage.mozilla.com/application/logs/2010-03-19.log.php, 2010-03-19 09:28:49 -07:00 --- debug: Database cache cleared: Database_Mysql_Driver
, 8 )
Please fix the permissions of the parent directory... or do we need to change something in our app? This is Kohana based and I haven't run into this issue before.
| Reporter | ||
Comment 1•15 years ago
|
||
What is the ownership and permissions of the parent directory?
'application/logs'
| Reporter | ||
Comment 2•15 years ago
|
||
@lorchard any ideas here?
CCing @ryansnyder another Kohana user.
I've looked through our configs and can't find anything that would cause this. In my dev env everything works, files are owned by www-data (apache).
Comment 3•15 years ago
|
||
I have run into a similar problem before. Ensuring that apache is the owner of the application/logs directory took care of the problem.
You can also check the config.php to ensure that $config['log_directory'] is set correctly.
| Reporter | ||
Comment 4•15 years ago
|
||
So this app is set up a little differently than other Kohana apps.
From https://svn.mozilla.org/projects/plugindir/trunk/README.markdown
* Make these directories exist and are writable by Apache:
* application/logs
* application/cache
* application/cache/twig
Also caching is setup in 'application/config/config-local.php' instead of application/config/cache.php
Comment 5•15 years ago
|
||
All of these directories already have world write access.
Assignee: server-ops → justdave
Comment 6•15 years ago
|
||
(In reply to comment #4)
> Also caching is setup in 'application/config/config-local.php' instead of
> application/config/cache.php
And I have no idea what I'm looking for that needs to be in one file and not the other, can you be more specific here? Shyam's the one who's been working on setting this up, and he's out for the weekend.
Comment 7•15 years ago
|
||
per discussion with ozten on irc, it doesn't sound like this is an emergency, so tossing over to shyam to take care of when he comes back from the weekend.
Assignee: justdave → shyam
| Reporter | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
Yesterday we deleted the log file and used the app to test log file creation. It created a new log with apache:apache owner and everything went fine.
This is a high priority bug, in terms of getting ready for a prod release.
| Reporter | ||
Comment 9•15 years ago
|
||
This issue is back for today's log
file_put_contents(/data/www/plugins.stage.mozilla.com/application/logs/2010-03-20.log.php) [function.file-put-contents]: failed to open stream: Permission denied
| Reporter | ||
Comment 10•15 years ago
|
||
Forcing an error does return a 500 in dev, which I wasn't seeing in stage.
I changed plugins.php line 305 to call a method that doesn't exist, to simulate a db error.
| Assignee | ||
Comment 11•15 years ago
|
||
FWIW, this won't happen on production since we have these on an NFS directory, mounted across the webheads.
I don't think this is blocking anything for a production release?
| Reporter | ||
Comment 12•15 years ago
|
||
(In reply to comment #10)
Ignore. This comment should have been made in Bug#552249
| Assignee | ||
Comment 13•15 years ago
|
||
Alright, this should be fixed. Les pointed out that we had a cron running, which would run as root...and hence messed up the permissions.
I've made the cron run as apache now, shouldn't see this again.
| Assignee | ||
Comment 14•15 years ago
|
||
So this just ran, and created no logs :
[root@mrapp-stage02 logs]# tailf /var/log/cron | grep plugins.stage
Mar 21 10:45:01 mrapp-stage02 crond[8004]: (apache) CMD (cd /data/www/plugins.stage.mozilla.com; ./bin/compile-mo.sh > /dev/null; rm -f /data/www/plugins.stage.mozilla.com/application/cache/twig/*)
Mar 21 10:45:01 mrapp-stage02 crond[8007]: (root) CMD (/usr/local/bin/svn-up.sh /data/www/plugins.stage.mozilla.com HEAD > /dev/null; )
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: mozilla.org → mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•