Skip to main content

chown .htaccess files in public_html?

Comments

2 comments

  • Jcats
    This will recursively search each account for .htaccess and change the ownership accordingly: for user in $(whmapi1 listaccts|grep user | awk '{print$2}') ; do find /home/"$user"/public_html/ -type f -name .htaccess -exec chown -v "$user": {} \; ; done
    Might take a while depending on how many accounts If you strictly only want to change ownership of /home/user/public_html/.htaccess then do for user in $(whmapi1 listaccts|grep user | awk '{print$2}') ; do chown -v "$user": /home/"$user"/public_html/.htaccess ; done
    0
  • cPanelLauren
    Hi @Robert Wiseman Because there's no automatic way to do this the solution suggested by @Jcats would work for what you're wanting to do. Thanks!
    0

Please sign in to leave a comment.