How to chmod by file extension to remove execute permission on some file types?

1

I have searched but couldn't find a proper way to do that. I find annoying that each time I click on a text or code file I have a prompt where I can execute the file (maybe it's me that messed up permissions...)

I would like to get rid of that as I know some file extesions would never be executables: *.js,*.php,*.txt,*.md,*.css,*.json...etc.

I have tried that:

sudo find . -name "*.js" -exec chmod -x {} \;

But noticed that it doesn't change anything...

tried also

chmod -R -x *.js

but that outputed an error

Please light my way :)

538ROMEO

Posted 2019-02-10T18:43:53.947

Reputation: 111

No answers