Source

Selador / setRights.sh

Full commit
#!/bin/bash

# Script to set 'correct' rights for the selado directory

# Change owner, so that every file belongs to the user (developer) and to the group of the webserver
chown -R $1:$2 .

# Put a kind of default to everything, so everyone can read and only owner can write
chmod -R u=Xrw,g=Xr,o=Xr .

# Remove executability from all files
find -type f -exec chmod -x {} \;

# Put executability for everyone on shell scripts
find -type f -name "*.sh" -exec chmod +x {} \;



# Allow server to write in var and local/hof
[ -d var ] && chmod -R g+w var
[ -d local/hof ] && chmod -R g+w local/hof