fixperms.sh 732 B

12345678910111213141516171819202122232425262728293031
  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. chmod a+x ./scripts/*/*.php
  25. chmod a+x ./scripts/*/*.sh
  26. chmod g-w ./scripts/*/*.php
  27. chmod g-w ./scripts/*/*.sh
  28. fi