2013-08-05 12:54:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
#------------------------------------------------------
|
|
|
|
|
# Script to set/fix permissions on files
|
|
|
|
|
#
|
|
|
|
|
# Laurent Destailleur - eldy@users.sourceforge.net
|
|
|
|
|
#------------------------------------------------------
|
|
|
|
|
# Usage: fixperms.sh (list|fix)
|
|
|
|
|
#------------------------------------------------------
|
|
|
|
|
|
2024-01-12 21:03:08 +01:00
|
|
|
# shellcheck disable=2166,2268
|
|
|
|
|
|
2013-08-05 12:54:34 +02:00
|
|
|
# Syntax
|
|
|
|
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
|
|
|
|
then
|
2015-03-13 16:20:42 +01:00
|
|
|
echo "Fix permissions of files"
|
2013-08-05 12:54:34 +02:00
|
|
|
echo "Usage: fixperms.sh (list|fix)"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# To detect
|
|
|
|
|
if [ "x$1" = "xlist" ]
|
|
|
|
|
then
|
2024-01-10 19:47:29 +01:00
|
|
|
echo Feature not yet available
|
2013-08-05 12:54:34 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# To convert
|
|
|
|
|
if [ "x$1" = "xfix" ]
|
|
|
|
|
then
|
2024-01-10 19:47:29 +01:00
|
|
|
find ./htdocs -type f -iname "*.php" -exec chmod a-x {} \;
|
|
|
|
|
find ./htdocs/install/ -type d -exec chmod ug+rw {} \;
|
2013-08-05 12:54:34 +02:00
|
|
|
chmod a+x ./scripts/*/*.php
|
|
|
|
|
chmod a+x ./scripts/*/*.sh
|
2014-10-17 15:30:38 +02:00
|
|
|
chmod g-w ./scripts/*/*.php
|
|
|
|
|
chmod g-w ./scripts/*/*.sh
|
2013-08-05 12:54:34 +02:00
|
|
|
fi
|