Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should not recommend to put lockrun files to /tmp #210

Open
betelgeuse opened this issue Dec 5, 2011 · 0 comments
Open

Should not recommend to put lockrun files to /tmp #210

betelgeuse opened this issue Dec 5, 2011 · 0 comments

Comments

@betelgeuse
Copy link
Contributor

http://docs.engineyard.com/adding-cron-jobs.html

/usr/bin/lockrun --lockfile=/tmp/jobname.lockrun -- sh -c "cd /data/appname/current && rake RAILS_ENV=production some:task"

http://unixwiz.net/tools/lockrun.html

IMPORTANT: Be sure to place the lockfile in a directory that only that user has the rights to, and not in /tmp (as this Tech Tip has previously suggested). If a different user has the ability to write to the directory, s/he could create a symbolic link from the target lockfile to some system file that uses locks the same way, and get the cron job to foul up the locking. 

As the instances are not multi user this is not a big concern but better to go with best practises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant