Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCP: Cannot perform operations list, copy on remote folders with names containing a space #551

Closed
wnemail opened this issue Oct 1, 2015 · 7 comments

Comments

@wnemail
Copy link

wnemail commented Oct 1, 2015

In scp mode,If the folder name have spaces,No access to that folder;Folder name with no spaces,You can go

Version is 1.4.0.7

@jimradford
Copy link
Owner

Can you provide the ls -l output on your remote system of a directory that SCP is barfing on? It should also be in the log view/log viewer

Thanks,
Jim

@wnemail wnemail closed this as completed Oct 1, 2015
@wnemail wnemail reopened this Oct 1, 2015
@wnemail
Copy link
Author

wnemail commented Oct 1, 2015

[root@localhost CentOS]# ls -al
total 11672908
drwx------. 7 CentOS CentOS 4096 Sep 26 18:15 .
drwxr-xr-x. 5 root root 4096 Aug 20 09:59 ..
-rwxr--r--. 1 CentOS CentOS 11951745676 Sep 10 13:42 android-sdk.7z
-rw-------. 1 CentOS CentOS 177 Sep 21 09:56 .bash_history
-rw-r--r--. 1 CentOS CentOS 18 Jul 24 02:51 .bash_logout
-rw-r--r--. 1 CentOS CentOS 176 Jul 24 02:51 .bash_profile
-rw-r--r--. 1 CentOS CentOS 124 Jul 24 02:51 .bashrc
drwxr-xr-x. 5 CentOS CentOS 4096 Sep 11 20:08 cygwin
drwxrwxrwx. 1 root root 45056 Sep 26 18:14 NTFS
-rw-r--r--. 1 root root 1210069 Mar 14 2015 ntfs-3g_ntfsprogs-2015.3.14.tgz
drwxrwxr-x. 5 CentOS CentOS 4096 Sep 21 09:39 oracle
drwxr-xr-x. 4 CentOS CentOS 4096 Sep 10 14:59 VirtualBox VMs--bak
drwxr-xr-x. 15 CentOS CentOS 4096 Sep 10 17:00 Virtual Machines--bak
[root@localhost CentOS]#

@wnemail
Copy link
Author

wnemail commented Oct 1, 2015

[root@localhost CentOS]# cd NTFS
[root@localhost NTFS]# ls -al
total 24953754
drwxrwxrwx. 1 root root 45056 Sep 26 18:14 .
drwx------. 7 CentOS CentOS 4096 Sep 26 18:15 ..
drwxrwxrwx. 1 root root 4096 Aug 26 2014 backgrounds
drwxrwxrwx. 1 root root 8192 Sep 25 09:19 BaiduYunDownload
-rwxrwxrwx. 2 root root 278661155 Jun 10 18:35 CentOS7.bak.tar.gz
-rwxrwxrwx. 1 root root 272383523 Jul 23 2011 CSCN15.zip
-rwxrwxrwx. 2 root root 1359467 Jun 10 18:35 debian-etc.tar.gz
drwxrwxrwx. 1 root root 8192 Jun 12 11:51 Document
drwxrwxrwx. 1 root root 8192 Mar 26 2015 Downloads
-rwxrwxrwx. 2 root root 153564725 Nov 26 2011 lamp.tar.gz
drwxrwxrwx. 1 root root 65536 Sep 24 12:01 linux—software
-rwxrwxrwx. 2 root root 582172 Oct 1 2011 Linux命令大全(Linuxidc.com修改版).chm
drwxrwxrwx. 1 root root 12288 Jun 12 12:18 Media
-rwxrwxrwx. 2 root root 86528 Aug 26 2014 mingw-get-setup.exe
drwxrwxrwx. 1 root root 0 Jun 12 12:21 open source software
drwxrwxrwx. 1 root root 40960 Jun 12 12:37 other
-rwxrwxrwx. 1 root root 143 Sep 13 2014 qq.txt
drwxrwxrwx. 1 root root 8192 Nov 25 2014 $RECYCLE.BIN
drwxrwxrwx. 1 root root 4096 Jun 12 12:24 Server and system
drwxrwxrwx. 1 root root 0 Oct 31 2014 System Volume Information
drwxrwxrwx. 1 root root 0 Sep 25 20:11 tencent
drwxrwxrwx. 1 root root 16384 Sep 24 13:26 Video Tutorial
-rwxrwxrwx. 2 root root 4292046523 Nov 25 2014 win2008_en_yuan_shi.GHO
-rwxrwxrwx. 2 root root 4916467907 Mar 21 2015 win2008_ruan_jian_en.GHO
-rwxrwxrwx. 2 root root 180 Nov 20 2014 win7优化服务可禁用.txt
drwxrwxrwx. 1 root root 28672 Sep 18 20:31 windows-software
-rwxrwxrwx. 2 root root 272904 Aug 2 2013 子网掩码计算器.rar
-rwxrwxrwx. 1 root root 297 Feb 6 2014 密钥.txt
-rwxrwxrwx. 2 root root 4531100186 Jul 16 2014 拓远教育RedhatLinux视频.zip
-rwxrwxrwx. 2 root root 11845 Jul 24 2014 朕.jpeg
-rwxrwxrwx. 1 root root 1918 Jun 19 2011 版权声明.txt
-rwxrwxrwx. 1 root root 377 Jun 17 2011 群管理.txt
-rwxrwxrwx. 2 root root 11105826738 Jul 15 2014 郑州拓远 红帽认证工程师.zip
[root@localhost NTFS]#

@wnemail
Copy link
Author

wnemail commented Oct 1, 2015

“VirtualBox VMs--bak” and "Video Tutorial" ,Like this have no access

@wnemail
Copy link
Author

wnemail commented Oct 4, 2015

In scp mode,If the folder name have spaces,No access to that folder;Not sh mode

@joeyhub
Copy link
Contributor

joeyhub commented Oct 5, 2015

Out of curiosity does you have anything in your log view about the execution of scp and arguments? It could be a case of not escaping. C# does not come with a function to escape arguments for the shell.

@jimradford jimradford changed the title In scp mode,If the folder name have spaces,No access to that folder SCP: Cannot perform operations list, copy on remote folders with names containing a space Oct 16, 2015
@jimradford
Copy link
Owner

Ok, looks like this bug has been around a long long time, we were not properly encapsulating folder names with spaces in quotation marks as pscp (windows really) requires.

@jimradford jimradford self-assigned this Oct 16, 2015
@jimradford jimradford added this to the v1.4.0.8 milestone Oct 16, 2015
jimradford added a commit that referenced this issue Oct 16, 2015
…d in quotation marks to deal with spaces in folder names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants