FTP new connection won't save

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
G o r d
Junior Member
Junior Member
Posts: 4
Joined: 2010-07-14, 23:43 UTC

FTP new connection won't save

Post by *G o r d »

Trying to set up a new FTP connection fails with a

Error: Cannot write C:\Program Files\totalcmd\wcx_ftp.ini!

Please remove the write protection!

Can this 'wcx_ftp.ini' file location be changed to another directory? (Perhaps this should be a configuration option.)
Is there some way to remove the write protection to this directory? (I think Windows7 won't allow users, not even administrators, to write to the 'Program Files' directory.)

I'm using Windows7 Pro and my account is an Administrator account.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Yes, under W7 you can't write to TOTALCMD folder under Program Files. However, you can add write permissions for users yourself - just open folder properties, choose Security tab, choose category Users and check all permission marks. BTW I don't recommend to do this :) I recommend to do this only for wcx_ftp.ini file (if file doesn't exist you may create empty one or just start elevated TC and save FTP connection - TC will create it and then you'll add permissions for it).

E.g. I have TC installed to E:\TOTALCMD (this folder preserves if I reinstall Windows or just use TC from another Windows) and I've set full permissions for all configuration files inside of TC folder:

Code: Select all

TOTALCMD\Addons\F4Menu\F4Menu.ini
TOTALCMD\Addons\MsCab\MsCabPacker.ini
TOTALCMD\fsplugin.ini
TOTALCMD\lsplugin.ini
TOTALCMD\Plugins\Lister\FileInfo\fileinfo.ini
TOTALCMD\Plugins\Lister\Imagine\Imagine.ini
TOTALCMD\Plugins\Packer\7Zip\7Zip.ini
TOTALCMD\Plugins\Packer\DiskDirExtended\DiskDirExtended.ini
TOTALCMD\Plugins\Packer\Multiarc\Multiarc.ini
TOTALCMD\usercmd.ini
TOTALCMD\wcx_ftp.ini
TOTALCMD\wcx_tmp.ini
TOTALCMD\wincmd.ini
...
Sometimes it is hard to detect which INI some plugin uses (since it can't create it in write-protected folder) but once I found it (e.g. by starting TC in eleveated mode) I add write permissions for that file.

BTW your *.bar files also require write permission. I made a folder TOTALCMD\Bars (with full permissions) and keep my *.bar files there.
G o r d
Junior Member
Junior Member
Posts: 4
Joined: 2010-07-14, 23:43 UTC

Thank you

Post by *G o r d »

Thank you WVV for the simple answer. I'm a newbie to Windows7 and heard about the requirement of running a program in elevated mode (as administrator).

This takes me back exactly 20 years when I was using SCO Unix. They used the same logic of running some programs as administrator while all other programs were run with reduced privledges. Of course SCO Unix only required this for truly administrative programs, not everyday tasks. Microsoft is about 20 years behind now!!!
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

Or just put the ini files elsewhere and use the official IniReloc tool to make TC read them from there.

https://plugins.ghisler.com/addons/inireloc.zip
User avatar
marv-in
Junior Member
Junior Member
Posts: 17
Joined: 2010-07-10, 15:39 UTC
Location: Czech Republic

Re: Thank you

Post by *marv-in »

G o r d wrote:... Microsoft is about 20 years behind now!!!
If you are storing config files (any config files, not only TC) in location, where is standard user not supposed to have write permission (windows folder, prog files, etc.), dont blaim microsoft of your ignorance.

There is AppData folder under current user account to store this config files.

You could check where are your TC config files located by selecting menu "Help" then select "About Total Commander" and at the bottom of displayed window is full path to your config files.

Best choice is to select AppData as your default config folder during TC instalation. There is no problem then.
G o r d
Junior Member
Junior Member
Posts: 4
Joined: 2010-07-14, 23:43 UTC

Thanks

Post by *G o r d »

Sob wrote:Or just put the ini files elsewhere and use the official IniReloc tool to make TC read them from there.

https://plugins.ghisler.com/addons/inireloc.zip
Thanks. This tool worked a charm.
G o r d
Junior Member
Junior Member
Posts: 4
Joined: 2010-07-14, 23:43 UTC

Re: Thank you

Post by *G o r d »

marv-in wrote:
G o r d wrote:... Microsoft is about 20 years behind now!!!
If you are storing config files (any config files, not only TC) in location, where is standard user not supposed to have write permission (windows folder, prog files, etc.), dont blaim microsoft of your ignorance.
Actually, I'm blaming MS for taking 20 years to finally protect the "programs" directory!
PRSchwob
Junior Member
Junior Member
Posts: 9
Joined: 2010-09-17, 03:29 UTC
Location: Palo Alto, CA, USA

wcx_ftp.ini is in Windows\ -- solved

Post by *PRSchwob »

I had the same problem (using Win 7 64 bit): couldn't store ftp sessions as I got a write permission error.

I tried first to create a blank wcx_ftp.ini in my c:\totalcmd dir and changing its permissions to Allow All for all users - didn't work...

I solved the problem by running totalcmd.exe as admin (right-click on the file and select "Run as administrator"). This allowed me to store a session. But I noticed that my \totalcmd\wcx_ftp.ini was still empty. So searched for wcx_ftp.ini and found it in c:\Windows (!) which I think is a bit weird as I thought I had told totalcmd (during install) to keep all ini files in the same dir as the executable. A bug or am I missing something?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

PRSchwob, by default TC keeps INI files in Windows dir (for many years). Then it uses registry settings to locate INI dir (installer sets theese values in registry). But if you want to keep your INI files in TC dir you need to edit your c:\totalcmdwincmd.ini and add parameter UseIniInProgramDir=7 to section [Configuration] - so your TC will use all INIs in its folder only.

Currently you may look which INI your TC uses by opening Help - About dialog.
PRSchwob
Junior Member
Junior Member
Posts: 9
Joined: 2010-09-17, 03:29 UTC
Location: Palo Alto, CA, USA

Post by *PRSchwob »

Splendid. Thanks a million!
P.
Post Reply