#!/usr/bin/env python1###############################################################################2#3# CoCalc: Collaborative Calculation in the Cloud4#5# Copyright (C) 2016, Sagemath Inc.6#7# This program is free software: you can redistribute it and/or modify8# it under the terms of the GNU General Public License as published by9# the Free Software Foundation, either version 3 of the License, or10# (at your option) any later version.11#12# This program is distributed in the hope that it will be useful,13# but WITHOUT ANY WARRANTY; without even the implied warranty of14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# GNU General Public License for more details.16#17# You should have received a copy of the GNU General Public License18# along with this program. If not, see <http://www.gnu.org/licenses/>.19#20###############################################################################21222324# Run bup_storage.py chown <project_id> for all projects on this host, with a little delay between25# each to not monopolize io26import time, os2728delay = 0.252930print "Getting list of all projects"31v = os.listdir('/projects')32print "Got %s projects"%len(v)3334for project_id in sorted(v):35c = "bup_storage.py chown %s"%project_id36print c37os.system(c)38time.sleep(delay)3940