26 Feb Changing permission on multiple files withing bash by kayals in Linux, Shell Srcipt, UnixComments File variable is an array and $files expands to the first element as you have noticed. To execute chmod on all elements of the array, use chmod +x "${files[@]}" Related posts:How to run multiple Linux commands from one lineInstall ONLYOFFICE Docs on Ubuntu 20.04INSTALLING PI-HOLE ON UBUNTU 18.04 LTS