Problems move files - Error permited denied

Advertisement

carla.duarte
Joined:
Posts:
2
Location:
brasil

Problems move files - Error permited denied

I am problems move files - error
Permission denied.
Error code: 3
Error message from server: Permission denied ao mover o arquivo /teste/Teste1.xlsx para /teste1/Teste1.xlsx.

at WinSCP.SessionLogReader.Read(LogReadFlags flags)
at WinSCP.ElementLogReader.Read(LogReadFlags flags)
at WinSCP.SessionElementLogReader.Read(LogReadFlags flags)
at WinSCP.ElementLogReader.Read(LogReadFlags flags)
at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.Session.MoveFile(String sourcePath, String targetPath)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,286
Location:
Prague, Czechia

Re: Problems move files - Error permited denied

Does the teste1 folder exist? Do you have write permissions there? Can you move the file there in WinSCP GUI? Or in any other client? Post logs.

Reply with quote

carla.duarte

Re: Problems move files - Error permited denied

Realizando via WINSCP.exe funciona normalmente mover o arquivo com o usuário. Se chamo o método via código .net lança a exception.

Reply with quote

Guest

Re: Problems move files - Error permited denied

Log XML WinSCP
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="******CTG7Y5@****150673.rm.cloudtotvs.com.br" start="2024-06-11T13:48:07.329Z">
<mv>
<filename value="/Arquivos_legado/Pendentes/AlteracaoSecao.xlsx" />
<destination value="/Arquivos_legado/Processados/AlteracaoSecao.xlsx" />
<result success="true" />
</mv>
<mv>
<filename value="/Arquivos_legado/Processados/AlteracaoSecao.xlsx" />
<destination value="/Arquivos_legado/Pendentes/AlteracaoSecao.xlsx" />
<result success="true" />
</mv>

Log xml .Net
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="******CTG7Y5@****150673.rm.cloudtotvs.com.br" start="2024-06-11T14:05:39.245Z">
<group name="open sftp://******CTG7Y5@****150673.rm.cloudtotvs.com.br:2323 -hostkey=&quot;*&quot; -timeout=15" start="2024-06-11T14:05:39.878Z">
</group>
<group name="pwd" start="2024-06-11T14:05:40.049Z">
<cwd>
<cwd value="/" />
<result success="true" />
</cwd>
</group>
<group name="stat -- &quot;/Arquivos_Legado/processados/AlteracaoSecao.xlsx&quot;" start="2024-06-11T14:05:41.827Z">
<stat>
<filename value="/Arquivos_Legado/processados/AlteracaoSecao.xlsx" />
<result success="false">
<message>Can't get attributes of file '/Arquivos_Legado/processados/AlteracaoSecao.xlsx'.</message>
<message>No such file or directory.
Error code: 2
Error message from server: No such file</message>
</result>
</stat>
<failure>
<message>Can't get attributes of file '/Arquivos_Legado/processados/AlteracaoSecao.xlsx'.</message>
<message>No such file or directory.
Error code: 2
Error message from server: No such file</message>
</failure>
</group>
<group name="mv &quot;/Arquivos_Legado/Pendentes/AlteracaoSecao.xlsx&quot; &quot;/Arquivos_Legado/Processados/AlteracaoSecao.xlsx&quot;" start="2024-06-11T14:06:45.687Z">
<failure>
<message>Error moving file '/Arquivos_Legado/Pendentes/AlteracaoSecao.xlsx' to '/Arquivos_Legado/Processados/AlteracaoSecao.xlsx'.</message>
<message>Permission denied.
Error code: 3
Error message from server: Permission denied</message>
</failure>
<mv>
<filename value="/Arquivos_Legado/Pendentes/AlteracaoSecao.xlsx" />
<destination value="/Arquivos_Legado/Processados/AlteracaoSecao.xlsx" />
<result success="false">
<message>Permission denied.
Error code: 3
Error message from server: Permission denied</message>
</result>
</mv>
</group>

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum