Skip to content

Instantly share code, notes, and snippets.

@caramelchocolate
Last active August 5, 2019 09:52
Show Gist options
  • Save caramelchocolate/720fcd04d29b160366a81812555247c0 to your computer and use it in GitHub Desktop.
Save caramelchocolate/720fcd04d29b160366a81812555247c0 to your computer and use it in GitHub Desktop.
chmod 777 in jail
#!/bin/sh
jls | awk 'NR>1 {print $4}' | awk -F'/' '{print $NF}' | xargs -L1 -I@ sh -c 'j=@; echo "${j}"; sh -c "ls -lt /jail/${j}/" | grep "tmp"; echo;'
#!/bin/sh
jls | awk 'NR>1 {print $4}' | awk -F'/' '{print $NF}' | xargs -L1 -I@ sh -c 'j=@; sh -c "chmod 777 /jail/${j}/tmp"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment