fixperms.sh 789 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. #------------------------------------------------------
  3. # Script to set/fix permissions on files
  4. #
  5. # Laurent Destailleur - eldy@users.sourceforge.net
  6. #------------------------------------------------------
  7. # Usage: fixperms.sh (list|fix)
  8. #------------------------------------------------------
  9. # Syntax
  10. if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
  11. then
  12. echo "Fix permissions of files"
  13. echo "Usage: fixperms.sh (list|fix)"
  14. fi
  15. # To detect
  16. if [ "x$1" = "xlist" ]
  17. then
  18. echo Feature not yet available
  19. fi
  20. # To convert
  21. if [ "x$1" = "xfix" ]
  22. then
  23. find ./htdocs -type f -iname "*.php" -exec chmod a-x {} \;
  24. find ./htdocs/install/ -type d -exec chmod ug+rw {} \;
  25. chmod a+x ./scripts/*/*.php
  26. chmod a+x ./scripts/*/*.sh
  27. chmod g-w ./scripts/*/*.php
  28. chmod g-w ./scripts/*/*.sh
  29. fi