Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EE538200C53 for ; Tue, 11 Apr 2017 22:21:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ECF8D160B9B; Tue, 11 Apr 2017 20:21:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 18EF8160B7D for ; Tue, 11 Apr 2017 22:21:47 +0200 (CEST) Received: (qmail 54506 invoked by uid 500); 11 Apr 2017 20:21:47 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 54495 invoked by uid 99); 11 Apr 2017 20:21:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Apr 2017 20:21:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D7A39181069 for ; Tue, 11 Apr 2017 20:21:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id K3N9rAucGMIF for ; Tue, 11 Apr 2017 20:21:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C823060DFB for ; Tue, 11 Apr 2017 20:21:43 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 19C7EE0D67 for ; Tue, 11 Apr 2017 20:21:43 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D55E32408A for ; Tue, 11 Apr 2017 20:21:41 +0000 (UTC) Date: Tue, 11 Apr 2017 20:21:41 +0000 (UTC) From: "Michael Osipov (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (WAGON-363) wagon-ftp fails to create non-existing directory when path contains "/../" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 11 Apr 2017 20:21:49 -0000 [ https://issues.apache.org/jira/browse/WAGON-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Osipov closed WAGON-363. -------------------------------- Resolution: Fixed Fixed with [1247688c22984fe40c6e51ce7c05315c33b10769|https://git-wip-us.apache.org/repos/asf?p=maven-wagon.git;a=commit;h=1247688c22984fe40c6e51ce7c05315c33b10769]. > wagon-ftp fails to create non-existing directory when path contains "/../" > -------------------------------------------------------------------------- > > Key: WAGON-363 > URL: https://issues.apache.org/jira/browse/WAGON-363 > Project: Maven Wagon > Issue Type: Bug > Components: wagon-ftp > Affects Versions: 2.1 > Environment: Maven 3.0.3 > Java 6u29 > Windows 7x64 > Reporter: Falko Modler > Assignee: Michael Osipov > Fix For: 2.13 > > > Creating non-existent parent folders as described in WAGON-265 does not work for the following scenario (real ftp-server replaced with "someurl.com"): > I want to upload the site for a module named "exec-listeners-extension". > This module inherits from mms-modules-parent (direct parent) which inherits from mms-parent ("transitive" parent). > All modules/parents have site-urls, whereas the url of exec-listeners-extension is defined as: > {code}${distributionManagement.site.urlBase}/maven/${project.artifactId}{code} > ${distributionManagement.site.urlBase} is defined in mms-parent ("transitive" parent of exec-listeners-extension): > {code}ftp://reuse-sites.mms-at-work.de/mms/www/reuse-sites{code} > So the final site location sould be: > ftp://someurl.com/mms/www/reuse-sites/maven/exec-listeners-extension > This folder/path does already exist and is writable: > ftp://someurl.com/mms/www/reuse-sites > The folder mms-parent within reuse-sites also does already exist. > The "maven" folder (and it's subfolder "exec-listeners-extension") do not exist and thus need to be created. > But this is what happens when calling mvn site-deploy: > {code} > Command sent: SYST > Reply received: 215 UNIX Type: L8 Version: SUNOS > Remote system is UNIX Type: L8 Version: SUNOS > Command sent: TYPE I > Reply received: 200 Type set to I. > ftp://someurl.com/mms/www/reuse-sites/mms-parent/ - Session: Opened > [INFO] Pushing c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site > [INFO] >>> to ftp://someurl.com/mms/www/reuse-sites/mms-parent/../maven/exec-listeners-extension > Command sent: CWD /mms/www/reuse-sites/mms-parent/ > Reply received: 250 CWD command successful. > Recursively uploading directory c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site as ../maven/exec-listeners-extension > processing = c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site as ../maven/exec-listeners-extension > Command sent: CWD ../maven/exec-listeners-extension > Reply received: 550 ../maven/exec-listeners-extension: No such file or directory. > Command sent: PWD > Reply received: 257 "/mms/www/reuse-sites/mms-parent" is current directory. > Command sent: CWD .. > Reply received: 250 CWD command successful. > Command sent: CWD .. > Reply received: 250 CWD command successful. > Command sent: PWD > Reply received: 257 "/mms/www" is current directory. > Command sent: CWD maven > Reply received: 550 maven: No such file or directory. > Command sent: MKD maven > Reply received: 550 maven: Permission denied. > Command sent: CWD /mms/www > Reply received: 250 CWD command successful. > Command sent: CWD /mms/www/reuse-sites/mms-parent > Reply received: 250 CWD command successful. > ftp://someurl.com/mms/www/reuse-sites/mms-parent/ - Session: Disconnecting > ftp://someurl.com/mms/www/reuse-sites/mms-parent/ - Session: Disconnected > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 47.461s > [INFO] Finished at: Fri Dec 09 20:56:09 CET 2011 > [INFO] Final Memory: 33M/961M > [INFO] ------------------------------------------------------------------------ > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:deploy (default-deploy) on project exec-listeners-extension: Error uploading site: Unable to create directory ../maven/exec-listeners-extension when processing c:\Develop\_dev\mms-modules\maven\exec-listeners-extension\trunk\target\site -> [Help 1] > {code} > Wagon-ftp executes "CWD .." twice which leads to a "Permission denied" later on when trying to create the "maven" folder in "www" (not writable!) instead of "reuse-sites". > I guess this is because WAGON-265 added an automatic "CWD .." (?) and the path being uses by wagon-ftp already contains "/../": > {code}[INFO] >>> to ftp://someurl.com/mms/www/reuse-sites/mms-parent/../maven/exec-listeners-extension{code} > I don't know why the path already contains a "/../". I guess this is because of the parent relationship?! -- This message was sent by Atlassian JIRA (v6.3.15#6346)