Loading "Set Permissions" from winscp3.ini

Advertisement

bolle732
Guest

Loading "Set Permissions" from winscp3.ini

I'm making a package for WinSCP 3.61. I use a batch file to start WinSCP with the appropriate ini file. I got more or less all configuration to load from the ini file.
Only the "Transport" -> "Upload Options" -> "SetPermissions" configuration aren't loaded from the ini file. If I configure them once by hand in the GUI, they stay saved on that machine. But on every new computer, I need to configure them again by hand, because they don't load from the ini.

I think the name in the winscp3.ini for this is "Text=" and I use "Text=rwx---rwx".

The reason is for a work around that I can't specify the group when a file is copied to the server and multiple persons need to work on it. Therefor, I give all rights to the world, which will be changed by a regulary run cron job.

I use WinSCP 3.61 on WIndows XP SP1 with a SSH2 connection to my Mandrake 9.x Linux box.

Any ideas how to fix that ?

Andreas

Reply with quote

Advertisement

bolle732
Guest

The batch file I use

May the problem reside with my batch file ?

The content is:
start /B winscp361.exe /INI=winscp3.ini user@server

Andreas

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: The batch file I use

I have tried it and it works fine for me. Maybe you can find some special circumstances under which it happens.

Reply with quote

bolle732
Guest

What I'm doing wrong

I hope you understand me right. I make the settings on one machine and store them in the winscp3.ini. Then I copy the winscp361.exe with the ini and batch files to another computer. The check box "Upload Options" is unset instead set and the "Set Permissions" isn't used by WinSCP.

Which is the corespondending entry in the winscp3.ini for "Upload Options" ?

Is the "Text=xxxxxx" used for the settings of "Set Permissions" ?

Or I'm using a wrong batch file for starting the WinSCP and all the settings aren't applied ?

I'm really stuck with this.

Andreas

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: What I'm doing wrong

bolle732 wrote:

I hope you understand me right. I make the settings on one machine and store them in the winscp3.ini. Then I copy the winscp361.exe with the ini and batch files to another computer. The check box "Upload Options" is unset instead set and the "Set Permissions" isn't used by WinSCP.
Yes I understand it. I have tried it and the check was checked after transfering the INI to another computer.

Which is the corespondending entry in the winscp3.ini for "Upload Options" ?
PreserveRights=0
(to check the option, 1 to uncheck it).

Is the "Text=xxxxxx" used for the settings of "Set Permissions" ?
It sets the permissions applied, if PreserveRights is 0.

Or I'm using a wrong batch file for starting the WinSCP and all the settings aren't applied ?
To verify if INI file is used at all, check if INI file configuration storage is selected on Preferences dialog. If registry is selected then WinSCP has not found INI file and uses the registry instead.

You may try to specify full path to INI file on command line. Or just store the INI file to the same directory where WinSCP is. Then you do not need to use /INI switch at all, WinSCP will find it itself.

Reply with quote

Advertisement

Guest

Problem found

I got your "solution". The problem was, that I had choosed the desktop as a temporary loaction for the files. WINSCP doesn't read the settings when I changed the ini file with a text editor.
I have moved the files to a directory called "C:\WINSCP" and used the full path to specify the location of the ini file. Now, the changes in the ini file are recognized by WinSCP. Without the full path, it doesn't work.

Strange is, that when not using the full path, the changes made in WinSCP have been saved too. The config location is reported as the ini file, but no changes have been made in it. For me, it seems that WinSCP is storing his setting somewhere undefined if not the full path to the ini file is specified. But I couldn't find it. No other ini file on the disk and nothing in the registry :(

It would be nice, if some day, WinSCP will use it current directory, independend where it and his ini file is stored (UNC).

Andreas

Reply with quote

martin
Site Admin
martin avatar

Re: Problem found

It would be nice, if some day, WinSCP will use it current directory, independend where it and his ini file is stored (UNC).
I think that current solution, i.e. WinSCP looks for INI file in its directory, is better for most user. As people usually have shortcut icon on desktop.

Reply with quote

Advertisement

You can post new topics in this forum