I need to do something similar except, I need to ask the user for their password and use that on the commandline.
Baiscaly, what I want to do is the following:
I have an automator workflow to copy user selected folders to the correct folder.
After that, just to be sure I want to execute the following commands:
Code:
cd /someFolder
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
find though seems to not like this unless run as a sudo'er.
No clue as to why because when not run though find, just manual chmod I don't get a permission denied from the terminal.
So I was wondering, how do I actually prompt the user for their password and then use that input to run the above commands, or even better, how do i recursively chmod the files and folders in such a way that find isn't necessary / prompts for a password?