#!/usr/bin/env bash
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
reset_file_path="/tmp/wp_demo_edge_perm_reset.lock"
root_path_edge="/home/theurbanestate-demo/public/wp-content"
if [ -f "$reset_file_path" ] && find "$reset_file_path" -maxdepth 1 -type f -mmin +5 | grep -q '.'; then
chown root:root -R $root_path_edge
chown apache -R $root_path_edge/uploads
rm -f $reset_file_path
else
exit 1
fi