Change ftp folder permission via command line - windows

I'm using windows command line MS FTP for ftp access. However I furthermore must change folder permission via command line as well. I tried CACLS command, alas that doesn't work in open ftp commmand window. Any hint's appreciated

You should be able to change permissions if you use a good GUI client.
Give the following a try and let us know if it works for you!
Filezilla
FTP Commander

FTP is an Internet standard designed by people who work together to a common goal. CACLS is a pile of Microsoft-invented stuff that FTP knows nothing about so that is not going to work unless someone implements a QUOTE command to pass it through. The nearest you can get to changing permissions is with the CHMOD command.

Related

Can I execute a remote placed .vbs file using wscript command?

I have tried using the wscript command with local file share and it works perfectly.
Ex: wscript \\192.168.10.1\script\hello.vbs
Is there any way I can run the file from remote HTTP server?
Something like: wscript http://192.168.10.1/script/hello.vbs
TIA
wscript.exe does not support calling VBScripts directly from an URL. Why not use the FTP server?
Why do you want to use the HTTP?
An solution for you could be, if you have it hosted on an NAS, try to open ports so that you can access it from your IP adres.
I could help you with it if you need it, but you need to give some more details about the hardware (NAS/Router)

Putty shortcut command

I googled some but didn't seem to find the awnser there :p (if it is even possible)
I want to create a shortcut for Putty that when you start it, it will login and run a command called ftptop.
Do you guys know how? Or is this even possible? :p
I want to do this so I can overview all active FTP connections.
Also is there a command to just overview all incoming connections? (FTP, SQL etc)
I have recently made some putty shortcuts automation / ease of access on windows. This may help you guys.
create a folder XYZ in C:\User\%USERNAME%\XYZ
user must have Write access in this folder to avoid HostNotFound error
place putty.exe in it
place a text command_file.txt containing few commands i.e. ls -lrt; sleep 10; logoff
create a windows shortcut with following configuration:
Target : C:\User\%USERNAME%\XYZ\putty.exe -ssh Vm0000xxxx -m "C:\Users\%USERNAME%\command_file.txt -t -loghost "Terminal_Title"
Start in : C:\Users\%USERNAME%\XYZ
Icon : %USERPROFILE%\XYZ\icon.ico

FTP: After mget *text*, the server responds with a ? then says BYE, even with -i

I can't figure out why the ftp site isn't getting 2 files, both of which match the wildcard MGET command. It almost appears there is a interactive prompt issue, (and yes, I've searched S.O. for other threads, which is why I'm now using the -i switch), but somehow when I do it manually - the EXACT SAME COMMAND, I can see that the server is prompting me.
When I use my batch file to automate it and refer to a command file, it acts offended that I can't interact with it, and it does not download the file. A screenshot of how it looks when I use the batch file is attached.
Any ideas?

How to change remote file permission via FTPClient

I need to handle remote file on a ftp server via commons-net-1.4.1.jar,class org.apache.commons.net.ftp.FTPClient.It's seems that no api available to change a file's permission,just like unix shell command chmod.
Anyone know any solution to resolve this issue?
FTP doesn't have a command for such operations, since the operation is platform-specific. If your library supports this, you can try using SITE command and pass the command line as a parameter of SITE command. Some servers support this trick to run shell commands.

DOS : how do you run a batch without having to login on a share?

I'm running an xcopy command in a batch script which copies a file to a shared drive on another workstation; however the workstation requires a login before connecting to the share. Is there a way to script the login/connect into the batch file?
thanks in advance
You can use the "net use x:\servername\sharename /u:username password" command to login to the share within the batch file. However putting the password into a plaintext batch file is generally a bad idea.
You can use net use to map a temporary drive and login using the credentials. This is what we had to do. Perhaps there is a better way. Then at the end of the script we unmap the drive.
Here is a link to the net use command: http://www.cezeo.com/tips-and-tricks/net-use-command/

Resources