Can't access mounted Windows shared containing space
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't access mounted Windows shared containing space
Hey all, I'm trying to automate a process for copying some Windows files to a Linux server. I can mount the share, and I can access all folders in the share except one -- the folder with a space in the name. Here are my mount and copy lines:
I tried getting into the share and here's that error:
Code:
root@srvBackup:/mnt/Windows# cd "Not Shared"
root@srvBackup:/mnt/Windows/Not Shared# ls -l
ls: reading directory .: Permission denied
total 0
root@srvBackup:/mnt/Windows/Not Shared#
Permissions are set the same in all folders. In my cp line I've tried different ways of using the quote marks but no joy. Anyone have any ideas on what I'm doing wrong? Can this even be done?
It looks like we may have made a bit of progress, at least we got it to recognize the path! The Invalid Argument should have something to do with your -r. Can you try a cp -R instead, or have you already tried that? There's plenty of debate over the difference, but it *should* be that -r will recursively copy files, and -R should recursively copy directories.
Oh, and is it possible to just change the Windows directory to be camel-case instead of having the space? That would certainly expedite trying to track down the source of the problem, though I'm fairly sure there must be a reason you haven't already.
root@srvBackup:/home/jobee/bin# cp -R "/mnt/Windows/Not Shared/*.*" /mnt/raid1/WinStuff/NotShared
cp: cannot stat `/mnt/Windows/Not Shared/*.*': No such file or directory
root@srvBackup:/home/jobee/bin# cp -R "/mnt/Windows/Not\ Shared/*.*" /mnt/raid1/WinStuff/NotShared
cp: cannot stat `/mnt/Windows/Not\\ Shared/*.*': Invalid argument
root@srvBackup:/home/jobee/bin# cp -R "/mnt/Windows/Not\ Shared/*" /mnt/raid1/WinStuff/NotShared
cp: cannot stat `/mnt/Windows/Not\\ Shared/*': Invalid argument
root@srvBackup:/home/jobee/bin# cp -R /mnt/Windows/"Not\ Shared"/* /mnt/raid1/WinStuff/NotShared
cp: cannot stat `/mnt/Windows/Not\\ Shared/*': Invalid argument
root@srvBackup:/home/jobee/bin#
I even tried moving the quote marks again just in case.
As to using CamelCase, I inherited this system so I'm not keen on making any changes like that; I don't know what is out there that it might break. I have thought about it a few times, and maybe down the road I'll just dive in and do it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.