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)

All
Other
task
Not set
critical

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.
What is the ownership and permissions of the parent directory? 'application/logs'
Blocks: 552249
@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).
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.
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
All of these directories already have world write access.
Assignee: server-ops → justdave
(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.
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
(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.
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
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.
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?
(In reply to comment #10) Ignore. This comment should have been made in Bug#552249
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.
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
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.