Guest User

Untitled

a guest
Jan 23rd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. ocpath='/home/owncloud'
  2. htuser='www-data'
  3. htgroup='www-data'
  4. rootuser='root'
  5.  
  6. printf "Creating possible missing Directoriesn"
  7. mkdir -p $ocpath/data
  8. mkdir -p $ocpath/assets
  9. mkdir -p $ocpath/updater
  10.  
  11. printf "chmod Files and Directoriesn"
  12. find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
  13. find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
  14.  
  15. printf "chown Directoriesn"
  16. chown -R ${rootuser}:${htgroup} ${ocpath}/
  17. chown -R ${htuser}:${htgroup} ${ocpath}/apps/
  18. chown -R ${htuser}:${htgroup} ${ocpath}/assets/
  19. chown -R ${htuser}:${htgroup} ${ocpath}/config/
  20. chown -R ${htuser}:${htgroup} ${ocpath}/data/
  21. chown -R ${htuser}:${htgroup} ${ocpath}/themes/
  22. chown -R ${htuser}:${htgroup} ${ocpath}/updater/
  23.  
  24. chmod +x ${ocpath}/occ
  25.  
  26. printf "chmod/chown .htaccessn"
  27. if [ -f ${ocpath}/.htaccess ]
  28. then
  29. chmod 0644 ${ocpath}/.htaccess
  30. chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
  31. fi
  32. if [ -f ${ocpath}/data/.htaccess ]
  33. then
  34. chmod 0644 ${ocpath}/data/.htaccess
  35. chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
  36. fi
  37.  
  38. ssh -p 1234 user@fakeraspi.ddns.net
  39. user@fakeraspi.ddns.net's password:
  40. /bin/bash: Permission denied
Add Comment
Please, Sign In to add comment