File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 " set-owner" ,
5858 " symlink-cake-core" ,
5959 " template" ,
60+ " tmp-dir-permissions" ,
6061 " update" ,
6162 " updatewritedirs" ,
6263 " writedirs"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # ---------------------------------------------------------------------
4+ usage ()
5+ {
6+ cat << EOT
7+
8+ ${0##*/ }
9+ Ensures the PHP temp directory provided on the command line is
10+ created and has writeable permissions. MUST BE RUN AS ROOT,
11+ typically via cron.
12+
13+ Usage:
14+ bin/${0##*/ }
15+
16+
17+ EOT
18+
19+ exit 0
20+ }
21+ if [ " $1 " = ' -h' ]; then
22+ usage
23+ fi
24+
25+ if [ -z " $1 " ]; then
26+ echo ' !! Must provide a path to the PHP temp directory as first argument.'
27+ exit 1
28+ fi
29+
30+ PHP_TMP_DIR=" $1 "
31+
32+ if [ ! -d " $PHP_TMP_DIR " ]; then
33+ mkdir -p " $PHP_TMP_DIR "
34+ fi
35+
36+ chmod -R a+rwx " $PHP_TMP_DIR "
37+ chmod +t " $PHP_TMP_DIR "
You can’t perform that action at this time.
0 commit comments