Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

fix to dining menu file permissions problem [#563]

  • Loading branch information...
commit 98a4ca15f9995a6e72a278c7d1ac15c3b8655666 1 parent eda507a
David Ormsbee authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 mobi-scripts/
12 mobi-scripts/
@@ -2,7 +2,11 @@
# Crontab entry: 15 06 * * 0 /opt/mitmobile/bin/
-# The sudo is here so that people running this script as "sudo ./"
-# don't accidentally make the file owned by root (breaking future attempts to
-# copy by apache).
-sudo -u apache cp /home/huds/upload/menu.csv /opt/mitmobile/static/menu.csv
+cp /home/huds/upload/menu.csv /opt/mitmobile/static/menu.csv
+# This is supposed to be run by user apache, but it might be run by someone
+# doing sudo ./ --> so make sure we set the permissions properly
+# in that case.
+chown apache /opt/mitmobile/static/menu.csv
+chgrp apache /opt/mitmobile/static/menu.csv
Please sign in to comment.
Something went wrong with that request. Please try again.