[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [jira] [Updated] (VFS-590) SFTP moveTo operation might fail on permission checks even if the operati
From: "L (JIRA)" <jira () apache ! org>
Date: 2015-11-30 10:52:11
Message-ID: JIRA.12916933.1448880680000.220180.1448880731192 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/VFS-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
L updated VFS-590:
------------------
Description:
Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.
The permission checks that VFS performs during moveTo() can result in failure.
org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject destFile) \
starts with some checks:
{code:java}
@Override
public void moveTo(final FileObject destFile) throws FileSystemException
{
if (canRenameTo(destFile))
{
if (!getParent().isWriteable())
{
throw new \
FileSystemException("vfs.provider/rename-parent-read-only.error", getName(),
getParent().getName());
}
}
else
{
if (!isWriteable())
{
throw new FileSystemException("vfs.provider/rename-read-only.error", \
getName()); }
}
{code}
The problem is: isWriteable() might fail or even hang. Performing moveTo without this \
check might successfully rename the file.
isWriteable() in case of SFTP can fail if the server disables SSH channelExec. Or if \
it does not support "id" command.
was:
Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.
The permission checks that VFS performs during moveTo() can result in failure.
org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject destFile) \
starts with some checks:
{code:java}
@Override
public void moveTo(final FileObject destFile) throws FileSystemException
{
if (canRenameTo(destFile))
{
if (!getParent().isWriteable())
{
throw new \
FileSystemException("vfs.provider/rename-parent-read-only.error", getName(),
getParent().getName());
}
}
else
{
if (!isWriteable())
{
throw new FileSystemException("vfs.provider/rename-read-only.error", \
getName()); }
}
{code}
The problem is: isWriteable() might fail or even hang while performing moveTo without \
this check might successfully rename the file.
isWriteable() in case of SFTP can fail if the server disables SSH channelExec. Or if \
it does not support "id" command.
> SFTP moveTo operation might fail on permission checks even if the operation itself \
> might succeed
> ------------------------------------------------------------------------------------------------
>
> Key: VFS-590
> URL: https://issues.apache.org/jira/browse/VFS-590
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Reporter: L
>
> Continuing with SFTP moveTo, see VFS-588 and VFS-589 for more details.
> The permission checks that VFS performs during moveTo() can result in failure.
> org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(final FileObject \
> destFile) starts with some checks: {code:java}
> @Override
> public void moveTo(final FileObject destFile) throws FileSystemException
> {
> if (canRenameTo(destFile))
> {
> if (!getParent().isWriteable())
> {
> throw new FileSystemException("vfs.provider/rename-parent-read-only.error",
> getName(),
> getParent().getName());
> }
> }
> else
> {
> if (!isWriteable())
> {
> throw new FileSystemException("vfs.provider/rename-read-only.error", getName());
> }
> }
> {code}
> The problem is: isWriteable() might fail or even hang. Performing moveTo without \
> this check might successfully rename the file. isWriteable() in case of SFTP can \
> fail if the server disables SSH channelExec. Or if it does not support "id" \
> command.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic