How to use MPUT in PSFTP to put the file with permission 777

190 Views Asked by At

I don't want to use chmod 777 *.xml so how I can use MPUT to put the file with permission 777? Now when I do not use chmod 777 *.xml then default put file with permission 0664.

This is my script

dir
lcd E:\Inbound
cd /interface/incoming
mput *.xml
chmod 777 *.xml

Thanks,

1

There are 1 best solutions below

0
Martin Prikryl On

On Windows, psftp does not support setting permissions of files while uploading them. So setting the permissions after upload using chmod command is the only way.

On *nix, psftp preserves permissions of source files.