POSIX path for do shell script

I am sure this is easy. I am trying to make a script that simply preforms a

do shell script “chmod -R 777 filepath”

I have tried every possible coercion I can think of.

The basics is as follows…

set a to choose folder
set b to POSIX path of a
"chmod -R 777" & quoted form of b

It does need to be recursive. Any ideas?!?!?!?

set a to choose folder
set b to POSIX path of a
do shell script "chmod -R 777 " & quoted form of b
-- note the space after 777 to so the file path won't abut it.

I had the portion “do shell scrip”

I left it off when I started this post by accident.

Thanks I though I wasn’t too far off.

Thank you very much!

Is there a way that I should mark this post as resolved?

If the file doesn’t need to be executed I wouldn’t use 777 but I would use 666 instead. With 666 you say everybody can read and write but nobody can execute the file. If it is an executable I prefer 555 over 777. When the file is a shell script I prefer 755 so the owner is the only one who can change the script.