SSH chmod question

Our NAS vendor uses  *NIX as the OS for thier platform. I ran into an issue of not being able to delete some files from the NAS in our Windows environment through a CIFS share. Our vendor (Bluearc) gave me instructions for deleting from their back-end. I SSH to this back-end, connect to the shares and can change permissions and delete files using the normal commands. The problem i'm having is some directories have multiple directories under it and sometimes many more under that. So my problem is I have to manually cd to each directory to either change permissions (so I can access through the CIFS share) or delete everything in that directory. If it happens to contain another directory with 200 folders in it I have to go to each one of those folder and delete everything manually to be able to delete the parent folder. I did a quick google and it shows me the recursive switch to chmod but that doesn't work on my *NIX system.
So I though maybe a GUI would help and I tried EngInSite DataFreeway. Which does give me the SSH session in a pretty GUI but doesn't allow me to run the necessary commands to connect to the CIFS shares to change the permissions or delete files.
So does anyone know a work around, trick, tip, anything? I'm looking at probably over 1000 directories I would manually have to go and delete files. I've already done about 100 and my eyes started to cross. Any help is appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if chmod -r doesnt work how about
find . -exec chdir


Find . | xargs -ivf chmod 666 {}

Or something like that?
Sorry, im on iphone and fingers are fat.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Have you tried giving the parent directory full access?
chmod 777 directory

Followed by:
rm -rf directory
-r  Recursively remove directories and subdirectories in the argument list.
wwoops, meant to say
find . -exec chmod 666 {} \
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Try something like this:

chmod 777 -R ./dirname
rm -rf ./dirname

This recursively changes the permissions of <dirname> and all files and subdirectories, then forces a delete on anything and everything recursively through said folder.

Did you try the find command and did it work ?
If -r, -R, and --recursive aren't working, I'd ask the vendor.

If the recursive mode isn't working, for some reason, then find is the next best answer.

find dir -exec chCommand {} \;


find subdir -exec chmod 777 {} \;

(the ; terminates the command, while the \ escapes it, so the shell doesn't think you're trying to chain commands)
js479Author Commented:
Thanks for the suggestions and I intend to try them as soon as I jump back on this project.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSH / Telnet Software

From novice to tech pro — start learning today.