(Solved) Folders with space throw permission denied

Discussions about using Linux guests in VirtualBox.
Post Reply
_AZ_
Posts: 20
Joined: 7. Feb 2012, 04:43

(Solved) Folders with space throw permission denied

Post by _AZ_ »

Hello,
having a problem accessing windows 10 folders that have space in it.
Host windows 10;
Guest Fedora 33

Code: Select all

[az@localhost AZ]$ cd My\ Documents/
[az@localhost My Documents]$ ls -l
ls: cannot open directory '.': Operation not permitted
[az@localhost My Documents]$ pwd
/mnt/AZ/My Documents
[az@localhost My Documents]$ id
uid=1000(az) gid=1000(az) groups=1000(az),976(vboxsf) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[az@localhost My Documents]$ mount | grep mnt
<REMOVED> on /mnt/AZ type vboxsf (rw,nodev,relatime)

Appreciate your input.
P.S. the folders without spaces can be accessed without issues.
Last edited by _AZ_ on 31. Mar 2021, 22:08, edited 4 times in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: PFolders with space throw permission denied

Post by scottgus1 »

Have you tried double quotes?

cd "My Documents"

I'm guessing that since this topic is in Linux Guests, this is the way the layout should read:
_AZ_ wrote:Guest Host windows 10;
guest Fedora 33
Are you using Virtualbox Shared Folders, set up through a Virtualbox dialog box? Or are these real shared folders, shared by the host Windows OS, over a Bridged or Host-Only network?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: PFolders with space throw permission denied

Post by mpack »

I see a couple of problems with the theory that "My Documents" is a host folder on Windows 10.

First, Win10 has no standard folder by that name - so despite sounding like a standard folder it either doesn't exist or it is a user created folder.

Second, if this is a host folder has been given a share name with a space in it, that is a bad idea. Use simple names: no spaces, no mixed case, no non Latin characters. Share names should use a lowest common denominator naming strategy.
_AZ_
Posts: 20
Joined: 7. Feb 2012, 04:43

Re: PFolders with space throw permission denied

Post by _AZ_ »

scottgus1 wrote:Have you tried double quotes?

cd "My Documents"

I'm guessing that since this topic is in Linux Guests, this is the way the layout should read:
_AZ_ wrote:Guest Host windows 10;
guest Fedora 33
Are you using Virtualbox Shared Folders, set up through a Virtualbox dialog box? Or are these real shared folders, shared by the host Windows OS, over a Bridged or Host-Only network?
Correct -this is _host_ Windows with the guest linux. I updated the original post accordingly.

I'm using Virtual Shared Folders thru the dialog box. Basically, i want "C:\Users\<UserName>" to be accessible to the guest. And it is. The problem arises when i try to access (from the guest) the subdirectory that has space. For example " My documents"

Code: Select all

[az@localhost AZ]$ ls -l ./Music/
total 1
-rwxrwxrwx. 1 root root 504 Mar 12 11:34 desktop.ini
[az@localhost AZ]$ ls -l ./"./My Documents"/
ls: cannot open directory '././My Documents/': Operation not permitted
[az@localhost AZ]$ pwd
/mnt/AZ

scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: PFolders with space throw permission denied

Post by scottgus1 »

As Mpack says, "My Documents" doesn't actually exist. It's:

C:\Users\{username}\Documents
_AZ_
Posts: 20
Joined: 7. Feb 2012, 04:43

Re: PFolders with space throw permission denied

Post by _AZ_ »

scottgus1 wrote:As Mpack says, "My Documents" doesn't actually exist. It's:

C:\Users\{username}\Documents
and indeed! The listing of "Start Menu" or "Saved Games" works as expected.

Thank you very much, guys!
Post Reply