VMware Communities
PaulTsai666
Contributor
Contributor

mount to share folders in windows , but it fails !!

Hi VM Ware Community Members:

I have some files need to move from windows to vm ware workstation. I want to use mount command to do that.

But I found that I can not mount(shown in the below pictures ) . I have tried two ways to mount the existed file folders.But It didn't work !!

How should I do for mount a share folders?

errors.png

Reply
0 Kudos
7 Replies
wila
Immortal
Immortal

Hello,

Have you tried adding the read-write option:

sudo mount -t cifs //192.168.0.100/C/test /mnt/share -o rw,user=PaulTsai

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
louyo
Virtuoso
Virtuoso

PMJI, to add to what Wil said:

I have a windows machine, 10.10.10.218 with a share of the E:\drive as E

From a file manager, Dolphin, Konqueror, etc
smb://lou@10.10.10.218/e

or for ftp like access:

smbclient \\\\10.10.10.218\\e -U lou

Will ask for password unless you are signed in with the same password and user name as the Windows machine.

Works for me.

Lou

Reply
0 Kudos
PaulTsai666
Contributor
Contributor

After testing the above mentioned modified codes it shows the following message :

So, what should I do for the next step to fix it ?

eee.png

Reply
0 Kudos
PaulTsai666
Contributor
Contributor

After searching the web site and found that typing the following command can fix the above problem

sudo apt-get install cifs-utils

but after install it, and retry, it shows the following "permission denied" message. I have checked the web site and

eee2.png

found that there are security option setting for the commands in /etc/samba/sma.conf file

but I try the following command

sudo mount -t cifs //192.168.0.100/C/TEST /mnt/SHARE -osec=ntlvm2 rw,username=192.168.116.128/PaulTsai

it shows the following message:

eee3.png

So, how can I fix the above issue ?

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

I'm not sure if the /etc/samba/.. settings are used by the cifs driver.

My guess is that that's for the smb driver that lou mentioned.

When I run this down here:

$ sudo mount.cifs //192.168.0.5/myShare /mnt/windows --verbose -o rw,user=wila

Then I get indeed the folder mounted (note that instead of using "sudo mount -t cifs" I directly use the mount.cifs command it invokes. For the rest it is the same.

Then when I try to write:

$ touch /mnt/windows/testWrite

touch: cannot touch ‘/mnt/windows/testWrite’: Permission denied

which is similar to what you see.

However this doesn't mean there is no write access.. it just meant that the user I am logged under has no write access.

Because this works fine.

$ sudo touch /mnt/windows/testWrite

and the file testWrite does indeed show up on the windows end.

There are ways to give your normal user write access. I saw the options: ,file_mode=0664,dir_mode=0775

mentioned somewhere else, but that didn't work for me... at least not until I changed the "user" option into "username".

This worked in my case:

$ sudo mount.cifs //192.168.0.5/myShare /mnt/windows --verbose -o rw,username=wila,file_mode=0664,dir_mode=0775

$ sudo touch /mnt/windows/testWrite3

$ ls -alh /mnt/windows/testWrite3

-rw-rw-r-- 1 root root 0 Aug 27 16:55 /mnt/windows/testWrite3

Anyways.. that gets into the nitty gritty of the cifs driver for which you can read more as well, just type man mount.cifs Smiley Happy

EDIT: Oops my bad, just now I notice that I accidentily inserted a  "sudo" on the touch command.

So  retested without and no it still doesn't create as normal user... the solution is somewhere in the options on the mount.cifs command though.

But I have to move onto other problems.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
PaulTsai666
Contributor
Contributor

Hi Wila:

After testing that you mentioned command above and retry, it seems works for accessing the files that in windows

The first picture shows that Ubuntu System can See the file in the Share folders that in my Windows System.

one small question about "--verbose", can you explain that use for this connection because I can't find about this cmd explaination ~!

success.png

success2.png

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

Glad to see that things start working on your end.

Quite a few commands in linux have a verbosity option to display more details on what is happening.

In this case for mount.cifs command it is the --verbose option, sometimes for other commands it is just -v

See also:

http://linux.die.net/man/8/mount.cifs

--verbose
Print additional debugging information for the mount. Note that this parameter must be specified before the -o. For example:

mount -t cifs //server/share /mnt --verbose -o user=username

In your screenshot the --verbose option is what gives you the extra feedback about C, "Retrying with upper case sharename" and it shows you in more details what it actually is trying to do.


So it is not a required option once it works, but it is helpful when you are still trying to get it to work.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos