open for write permission denied code example
Example 1: permission denied bash
chmod -R +x folder/*
# give execution permission for all scripts in the directory
Example 2: echo to file permission denied
echo "hello" | sudo tee f.txt # add -a for append (>>)