Trouble Accessing Unraid Share from Ubuntu Server VM


Recommended Posts

I'm having trouble setting up permanent access to an Unraid share from an Ubuntu Server VM. Setting up the share in the VM settings seems to prevent me from connecting to it via SSH so instead I've been trying to mount it over the network. 

 

This works in order to mount once:

sudo mount -t cifs -o username=username,password=password //serverip/share /media/share/

 

But I'd like it to automatically mount on reboot. And when I mount it using the method above, I can only write to the share using root privileges.

 

So I created a an ~/.smbcredentials file, set the chmod permissions and added the following to the /etc/fstab file:

//serverip/share /media/share cifs uid=ubuntuuser,credentials=/home/ubuntuuser/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

 

But this doesn't seem to automatically mount the share after reboot. Does anyone know how to get the share to auto mount after reboot with full read and write permissions? 

 

Thanks!

Link to comment
6 hours ago, JohnyClassic said:

But this doesn't seem to automatically mount the share after reboot.

 

Once you edit fstab try it with:

sudo mount -a

Does it show no errors?

 

6 hours ago, JohnyClassic said:

uid=ubuntuuser

Did you use uid=1000 ?

 

What is the format of the content of .smbcredentials?

Edited by ghost82
Link to comment
8 hours ago, ghost82 said:

 

Once you edit fstab try it with:


sudo mount -a

 

"mount error(2): No such file or directory"

Quote

Did you use uid=1000 ?

No I didn't, I thought I was supposed to add the Ubuntu username. Although, after adding that I'm still getting the above error.

Quote

What is the format of the content of .smbcredentials?

 

username=username
password=password

 

Link to comment
1 hour ago, JohnyClassic said:

"mount error(2): No such file or directory"

No I didn't, I thought I was supposed to add the Ubuntu username. Although, after adding that I'm still getting the above error.

 






username=username
password=password

 

No by uid you need to specify the user id, i.e. a number. uid 1000 is the first non root user.

As far as .smbcredentials, add also the domain:

username=myUser
password=myPass
domain=WORKGROUP

Of course, put a real user, a real password and a real domain.

Make sure that the mounting point, i.e. the folder, already exists on your guest (/media/share/).

Always respect capital and non capital letters.

I would also add a / after share in the fstab: not sure it's mandatory but share is a folder so I would specify it by /media/share/ instead of /media/share

Edited by ghost82
Link to comment
21 hours ago, ghost82 said:

No by uid you need to specify the user id, i.e. a number. uid 1000 is the first non root user.

As far as .smbcredentials, add also the domain:


username=myUser
password=myPass
domain=WORKGROUP

Of course, put a real user, a real password and a real domain.

Make sure that the mounting point, i.e. the folder, already exists on your guest (/media/share/).

Always respect capital and non capital letters.

I would also add a / after share in the fstab: not sure it's mandatory but share is a folder so I would specify it by /media/share/ instead of /media/share

I updated it all with everything you noted above. I'm still getting "mount error(2): No such file or directory". 

Link to comment
23 minutes ago, jonathanm said:

What are the permissions and owner of /media/share?

It was (0755/drwxr-xr-x) and root. I tried changing it to (0777/drwxrwxrwx) and to the Ubuntu user but I'm still getting the error. Are there specific permissions I should set? looks like the workgroup is still set to root. I'm not sure if that matters.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.