Filesystem plugin (ext2 R/W). problem with FsRenMovFile
Moderators: Hacker, petermad, Stefan2, white
Filesystem plugin (ext2 R/W). problem with FsRenMovFile
I'm creating filesystem plugin for Ext2.
most important difference from existing plugin is ability to write.
actually, it's almost complete, but i found problem with moving directories.
While move files Total Commander calls:
- FsRenMovFile with every inner file
- FsMkDir with every directory
this is not acceptable by foreigner filesystems because attributes and access rights can not be preserved.
also, this method is very slow because requires to many disk access.
is it possible to get info about moving directories to let my plugin quickly re-link top level directory to another location with preserving attributes&rights?
currently, while moving i have to chmod 777/gid:0/uid:0 to every dir which is not good from security point of view..
if it's not possible now, will be possible it in near upcoming releases?
most important difference from existing plugin is ability to write.
actually, it's almost complete, but i found problem with moving directories.
While move files Total Commander calls:
- FsRenMovFile with every inner file
- FsMkDir with every directory
this is not acceptable by foreigner filesystems because attributes and access rights can not be preserved.
also, this method is very slow because requires to many disk access.
is it possible to get info about moving directories to let my plugin quickly re-link top level directory to another location with preserving attributes&rights?
currently, while moving i have to chmod 777/gid:0/uid:0 to every dir which is not good from security point of view..
if it's not possible now, will be possible it in near upcoming releases?
Last edited by tairus on 2006-03-20, 04:19 UTC, edited 1 time in total.
Great!!I'm creating filesystem plugin for Ext2.
most important difference from existing plugin is ability to write.
I had and still have a similar problem. In my opinion TC should't call FSMKDir during a FsRenMovFile.actually, it's almost complete, but i found problem with moving directories.
While move files Total Commander calls:
- FsRenMovFile with every inner file
- FsMkDir with every directory
The problems i found due to this issue are below. But it seems that nobody cares:
http://ghisler.ch/board/viewtopic.php?t=9705
http://ghisler.ch/board/viewtopic.php?t=9678
I agree with your proposal. Whenever it is to improve, my vote is yes.
______________________
David Jorge
Personal License #117854
David Jorge
Personal License #117854
I one of my early morning dreams i remembered of your problem 
In SFTP plugin, there is a possibility to delete connections just like folders, but you won't delete all files on server, right? So you have to stop that.
There is a FsStatusInfo, where
switch (InfoOperation) {
case FS_STATUS_OP_DELETE: ...
sets a flag and FsFindFirst does then only
return INVALID_HANDLE_VALUE;
so you can't enter that connection in this operation, so you can't delete your files. Maybe you can do something like this within your plugin with MOVE operation.

In SFTP plugin, there is a possibility to delete connections just like folders, but you won't delete all files on server, right? So you have to stop that.
There is a FsStatusInfo, where
switch (InfoOperation) {
case FS_STATUS_OP_DELETE: ...
sets a flag and FsFindFirst does then only
return INVALID_HANDLE_VALUE;
so you can't enter that connection in this operation, so you can't delete your files. Maybe you can do something like this within your plugin with MOVE operation.
ok. here we are:
http://rapidshare.de/files/15948505/ext2rw.zip.html
ext2 read/write plugin v1.0 - for Total Commander.
although it seems writes ok, i'm not responsible for your linux file system corruption.
Tested only on Ext2 partitions. Ext3/ReiserFS not tested and most likely not supported.
Any writting to non-fully compatible Ext2 filesystem will ruin your files!
How to install the plugin in Total Commander:
1. Unzip the archive to an empty directory
2. Choose Configuration - Options - Operation - FS-Plugins
3. Click "Add"
4. Go to the "output" subdirectory and choose ext2.wfx
5. Click OK. You can now access the plugin in "Network Neighborhood"
known issues:
- plugin will try detect only root (described in MBR) partitions. Extended partitions will be not analyzed.
I have no extended partitions and no free HDD space to test. May be in future i'll add it.
- after move dirs from ext2 to ext2 result will have mod = 777 gid = 0 uid = 0.
This is lack of Total Commander, i have nothing to do here.. (although, files will preserve their mod/gid/uid)
- read/write are sloooow.. But since this plugin is not intended to be full replacement for file system driver,
i think it's acceptable. more important is correct writting. i hope it does.
anyone may test it and use if it's working
it's free and will be free. It's not my area of commercial interests
Just wanted to make work with some my linux partitions a little bit easier..
post feedbacks/bugs here.
http://rapidshare.de/files/15948505/ext2rw.zip.html
ext2 read/write plugin v1.0 - for Total Commander.
although it seems writes ok, i'm not responsible for your linux file system corruption.
Tested only on Ext2 partitions. Ext3/ReiserFS not tested and most likely not supported.
Any writting to non-fully compatible Ext2 filesystem will ruin your files!
How to install the plugin in Total Commander:
1. Unzip the archive to an empty directory
2. Choose Configuration - Options - Operation - FS-Plugins
3. Click "Add"
4. Go to the "output" subdirectory and choose ext2.wfx
5. Click OK. You can now access the plugin in "Network Neighborhood"
known issues:
- plugin will try detect only root (described in MBR) partitions. Extended partitions will be not analyzed.
I have no extended partitions and no free HDD space to test. May be in future i'll add it.
- after move dirs from ext2 to ext2 result will have mod = 777 gid = 0 uid = 0.
This is lack of Total Commander, i have nothing to do here.. (although, files will preserve their mod/gid/uid)
- read/write are sloooow.. But since this plugin is not intended to be full replacement for file system driver,
i think it's acceptable. more important is correct writting. i hope it does.
anyone may test it and use if it's working

it's free and will be free. It's not my area of commercial interests

post feedbacks/bugs here.