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:Can’t log into phpMyAdmin: mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’local...How To Secure Apache with Let's Encrypt on Ubuntu 20.04Upgrade PHP 7.2.x to 7.4.x in centOS