I have logged into a server via sftp via terminal.
When I run the command
chmod -R 755 ./*
I get the error
You must supply a numeric argument to the chmod command.. How do I apply a recursive chmod 755 while in sftp?
You may not be able to. There's a good chance the chmod available to you via FTP or SFTP does not support the recursive option. Commands available under FTP/SFTP are often somewhat crippled versions of what you'd have available locally under the shell. If you're lucky, chmod may act recursively even without the
repeatedly until you have reached all files and get the error:
Before such a mass change, you could double-check in advance which directories would be affected with
like this (specify an absolute path to
You can also use
I was working on a server where the recursive did not seem to be supported as per Nicole's comment above. The wildcard chmod did work, but was timing out trying to run on the insane folder structure.
What did the trick for me in the end was actually Filezilla - although I couldn't recursively chmod via terminal, Filezilla was able to do it somehow via it's GUI.