PDA

View Full Version : OnFTPNewDir


BL4DE
01-17-2003, 08:07 PM
OnFTPNewDir is triggered when the dir is already there

darkone
01-17-2003, 08:10 PM
This is more of feature.. OnFTPNewDir is/was designed to prevent directory creation :o (anyways, I'll rename that event soon & add one that is triggered after directory is creation with this name)

Miky
09-15-2003, 08:18 AM
when it could be done?
THX

Miky
10-14-2003, 03:33 AM
D1 can you please fix this?
I wrote the script on pre mkd to avoid this, but it doesn't work properly and I don't know why :(

Clients create dirs in many ways:
(pwd /some/where/)

mkd new.dir
mkd new.dir/
mkd /some/where/new.dir
mkd /some/where/new.dir/

these I can handle, but sometimes it's not enough :(

THX

FTPServerTools
10-14-2003, 04:14 AM
Miky if you want to block new dirs then use the [pre] mkd=... for that. Be aware of the return code!

Miky
10-14-2003, 04:17 AM
YES I did it,
but I don't know why my script doesn't deny ALL existing dirs.

FTPServerTools
10-14-2003, 04:23 AM
Probably because your script is wrong?? The event works fine.

Miky
10-14-2003, 04:36 AM
:)
yah I know that :)

so other way is to fix it in ioftpd :)

or I have to set up long time debuging and figure out all ways how clients create new dirs, but for it I haven't time :(

....

but D1 knows about this little bug maybe for 9 months and fix is nowhere (nothing against D1, everybody has own priorities), so I probably have to fix it my way :(

PaJa
10-17-2003, 07:11 AM
heh just add check if folder already exists or not :) i dont see any problems here

Miky
10-20-2003, 12:49 AM
I already solve this problem
it was a little bit complicated

I insert to my "script" by cookies physical path
next argument is command (MKD <new dir>).
Than I open dir from cookies and check for "new" dir,

BUT

sometimes it works and sometimes doesn't :(
The problem was, that when someone upload more dirs at once
(more dirs in queue) he always was not in dir where he want makes it.

So now I have to ask ioftpd where is the user's vfsfile
and find out physical dir correspond to virtual dir

Miky