Document management appears broken on Windows - ftp - 550 Invalid database path:

Bug #717750 reported by Christophe Hanon (www.adins.be)
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP Publisher's Warranty Team

Bug Description

USing windows 7 / all in One 6.0.1.
Simple step.
Configure a db with demo data took only knwoledge with the ftp document management.
Opening ftp on port 8021 works and the databases appear. However clicking always finishes by
"550 Invalid database path: <database name>.

This works fine on linux

Tags: maintenance

Related branches

Revision history for this message
Christophe Hanon (www.adins.be) (chanon) wrote :

2011-02-12 16:07:29,973][?] INFO:FTP:[]127.0.0.1:55141 Connected.
[2011-02-12 16:07:29,973][?] INFO:FTP:[anonymous]@127.0.0.1:55141 Authentication failed: anonymous access not allowed.
[2011-02-12 16:07:29,973][?] INFO:FTP:[anonymous]@127.0.0.1:55141 Disconnected.
[2011-02-12 16:07:30,973][?] INFO:FTP:[]127.0.0.1:55144 Connected.
[2011-02-12 16:07:33,805][?] INFO:FTP:[admin]@127.0.0.1:55144 User admin logged in.
[2011-02-12 16:07:33,950][testdms] INFO:FTP:[admin]@127.0.0.1:55144 FAIL get_crdata() "/adinsprod" errno=2: Invalid database path: \adinsprod.
[2011-02-12 16:07:33,951][testdms] INFO:FTP:[admin]@127.0.0.1:55144 OK MDTM "/adinsprod".
[2011-02-12 16:07:34,002][testdms] INFO:FTP:[admin]@127.0.0.1:55144 FAIL get_crdata() "/adinsprod" errno=2: Invalid database path: \adinsprod.
[2011-02-12 16:07:34,051][testdms] INFO:FTP:[admin]@127.0.0.1:55144 FAIL get_crdata() "/adinsprod" errno=2: Invalid database path: \adinsprod.
[2011-02-12 16:08:30,411][testdms] INFO:FTP:[admin]@127.0.0.1:55144 Disconnected.

Revision history for this message
Christophe Hanon (www.adins.be) (chanon) wrote :

May be is this related to the /adinsprod and \adinsprod ?

Revision history for this message
Erik Heeren (erik-heeren) wrote :

I have the same issue: works fine with an OpenERP installation on Linux and FTP client on Windows, but doesn't work with an OpenERP installation on Windows and FTP client on Windows.

Manually entering 'CWD /test' to go into the test database folder still results in an "Invalid database path: \test" error.

Changed in openobject-addons:
assignee: nobody → Jay Vora (OpenERP) (jvo-openerp)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
assignee: Jay Vora (OpenERP) (jvo-openerp) → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
wilson (martic98) wrote :

Same issue, this is what i did to fix this bug.

in file abstracted_fs.py:
path = _to_unicode(os.path.normpath(path)) # again, for '/db/../ss'
if path == '.': path = ''

#add this line
path = path.replace('\\', '/')

Revision history for this message
Jan B. Krejčí (janbkrejci) wrote :

There is a line in abstractfs.py that contains "hardcoded unix separator" in comment (in 6.0.2 version). Replacing '/' with os.sep foxed the problem for me.

Revision history for this message
Jan B. Krejčí (janbkrejci) wrote :

I mean "fixed"...

Revision history for this message
Yann Papouin (yann-papouin) wrote :

This has been fixed in a git repository in the trunk-xgr:
P. Christeasdoc ftp: implement support for "cwd .." operation
P. Christeasdoc ftp: fix listing the root folder with "" path
P. Christeasdoc_ftp: don't use os.path functions, but always Unix...

http://openerp-addons.git.sourceforge.net/git/gitweb.cgi?p=openerp-addons/openerp-addons;a=history;f=document_ftp/ftpserver/abstracted_fs.py;h=5d481f14c18a02f936c8257f5185b1147d3e2fbb;hb=HEAD

Revision history for this message
Thibaut DIRLIK (Logica) (thibaut-dirlik) wrote :

Hi,

This bug is still not fixed in trunk nor in stable. The patch proposed by Yann Ppouin worked for me on windows. This should be merged (or fixed if you don't want to merge it) in the trunk ASAP.

Moreover, I got a "Operation is not permitted" error when using the Windows Explorer of Firefox FTP client, wheras it works fine with a "real" FTP client like Filezilla.

Revision history for this message
Ray Carnes (rcarnes) wrote :

This bug exists in 6.1

The fix suggested by Jan B. Krejčí (janbkrejci) worked for me:

In abstractfs.py:

Line 275 is:

        p_parts = path.split("/") # hard-code the unix sep here, by spec.

Should be:

        p_parts = path.split(os.sep) # hard-code the unix sep here, by spec.

This fixed the problem for me on Windows 7 64-bit.

tags: added: maintenance
Revision history for this message
Erwin van der Ploeg (BAS Solutions) (erwin-bassolutions-deactivatedaccount) wrote :
Changed in openobject-addons:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.