Chmod syntax in FTP client in all subdirectories

What ftp client or what syntax allows easy chmod for subdirectories?

+2


source to share


6 answers


To chmod all the subdrives from where you are (recursive):



chmod -R *

      

0


source


I'm pretty sure Filezilla does it



0


source


ncftp will support the command chmod

if the FTP server supports it.

0


source


As the answer from @Ken G suggests, this will most likely be the question "what the FTP server supports".

I tried ncftp (runs under Cygwin on Win XP) against Sun FTP running on Solaris 10 (where chmod -R

o / s is supported chmod

). I got the error:

ncftp /work1/jleffler/tmp > chmod -R g+x *
chmod g+x: server said: 'SITE CHMOD -R g+x': command not understood.
chmod *: server said: 'SITE CHMOD -R xx.pl': command not understood.
ncftp /work1/jleffler/tmp >

      

My suspicion is that few, if any, systems make things easier. It's worth checking if the NCFTP server helps.

0


source


LFTP allows recursive CHMOD if the client allows it. You can do this by logging in with LFTP from the Unix / Linux CLI and then running the following:

chmod -R 0755 /www/directory/*

      

You can also set up a real nifty Bash script to do this:

#!/bin/bash
lftp <<EOF
set ftp:ssl-allow no
set ftp:passive-mode true
set ftp:list-options -a
open -u [user],[password] [host]
chmod -R 0777 /www/directory/*
EOF

      

Of course, LFTP does not distinguish between files and folders, to run this command only on files / folders, respectively, I would suggest using FileZilla. This allows this when running a command in a folder.

0


source


chmod -R 755 {DIR}

      

You recurse with -R

0


source







All Articles