Order for the chmod operation
Remove apt-get update command

Something is going on with security.ubuntu.com