[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/bin/ -> modfix.sh (source)

   1  #!/bin/sh
   2  
   3  CWD=`pwd`
   4  DIR=`echo $0 | awk -F'modfix.sh' '{print $1}'`
   5  
   6  DIR_MODE=777
   7  FILE_MODE=666
   8  
   9  
  10  #cd $DIR
  11  
  12  if [ ! -f "index.php" -a \
  13       ! -f "access.php" -a \
  14       ! -f "pre_check.php" -a \
  15       ! -d "bin" -a \
  16       ! -d "lib" -a \
  17       ! -d "kernel" ] ; then
  18       echo "You seem to be in the wrong directory"
  19       echo "Place yourself in the eZ publish 3 root directory and run ./bin/modfix.sh"
  20       exit 1
  21  fi
  22  
  23  chmod $DIR_MODE var/cache/
  24  if [ ! -d var/cache/ini ]; then
  25      mkdir var/cache/ini
  26      echo "Created var/cache/ini"
  27  fi
  28  
  29  if [ ! -d var/cache/texttoimage ]; then
  30      mkdir var/cache/texttoimage
  31      echo "Created var/cache/texttoimage"
  32  fi
  33  chmod $DIR_MODE var/cache/texttoimage
  34  
  35  if [ ! -d var/cache/codepages ]; then
  36      mkdir var/cache/codepages
  37      echo "Created var/cache/codepages"
  38  fi
  39  chmod $DIR_MODE var/cache/codepages
  40  
  41  if [ ! -d var/cache/translation ]; then
  42      mkdir var/cache/translation
  43      echo "Created var/cache/translation"
  44  fi
  45  chmod $DIR_MODE var/cache/translation
  46  
  47  if [ ! -d var/storage/packages ]; then
  48      mkdir var/storage/packages
  49      echo "Created var/storage/packages"
  50  fi
  51  chmod $DIR_MODE var/storage/packages
  52  
  53  
  54  chmod $DIR_MODE var/cache/ini
  55  chmod -R $DIR_MODE var/storage
  56  chmod -R $DIR_MODE var/webdav
  57  
  58  chmod -R $DIR_MODE settings
  59  
  60  if [ ! -d var/cache/template/tree ]; then
  61      mkdir -p var/cache/template/tree
  62      echo "Created var/cache/template/tree"
  63  fi
  64  if [ ! -d var/cache/template/process ]; then
  65      mkdir -p var/cache/template/process
  66      echo "Created var/cache/template/process"
  67  fi
  68  chmod -R $DIR_MODE var/cache/template
  69  
  70  if [ ! -d var/log ]; then
  71      mkdir var/log
  72      echo "Created var/log"
  73  fi
  74  chmod $DIR_MODE var/log
  75  LOGFILES="error.log warning.log notice.log debug.log"
  76  for LOGFILE in $LOGFILES; do
  77      LOGPATH="var/log/$LOGFILE"
  78      if [ -f $LOGPATH ]; then
  79      chmod $FILE_MODE $LOGPATH
  80      fi
  81  done
  82  
  83  if [ -d design ]; then
  84      chmod $DIR_MODE design
  85  fi
  86  
  87  
  88  chmod $DIR_MODE var
  89  
  90  #cd $CWD
  91  
  92  #cd $CWD
  93  echo "
  94  *** WARNING WARNING WARNING WARNING ***
  95  This script sets 777 as permissions in var/
  96  THIS IS NOT SECURE!
  97  Find the user and group for your web server and make them owner of all files in var/
  98  You should be able to find this information in the configuration file for your web server.
  99  
 100  For example:
 101  If your web server user is apache and the group is apache, then run the following commands:
 102  # chown -R apache.apache var/
 103  # chmod -R 770 var/
 104  "
 105  


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7