Jump to content

Recommended Posts

Posted

I have a Orange PI PC that I"m setting up as my file server with samba.  I am using a hard drive with a SATA to USB adapter for my storage device.

 

I've read and tried many HOW-TOs and none of them seem to get it working properly.  Even though, they all say it is easy and it looks easy.

 

I am able to see the shared folder over the network but Windows says that I don't have permissions to access it.

 

One idea that I've had is that I'm not accessing the share folder through the config file.  However I'm not sure how to properly access my HDD.  Right now I am using the path that you would get from opening the disk on the desktop.  Something like "\media\user\share"

 

Any ideas on first steps or fixes?

 

Thanks!

Posted

Need to see your smb.conf file to help you on this.  Its most likely a permission problem, like allowing guests to see the samba share. 

Posted

Mount your HDD in folder inside your Home directory, so you will have full access through you active user elevations. You can edit fstab to be sure your HDD will be mounted in the same folder and paths after reboot. Better use mount by name (if you add name to your HDD volumes), or UUID. Then add your active user as smb user:

sudo smbpasswd -a <user_name>

Then add this at the end of your smb.conf (sudo nano /etc/samba/smb.conf):

[<folder_name>]
path = /home/<user_name>/<folder_name>
valid users = <user_name>
read only = no

testparm
sudo service smbd restart

To avoid sharing of all your Home directory by Samba, comment all sections, related to ";[homes]", including. Of course you can use different user, from your actual, system user, for Samba sharing, but this is the easiest way.

Posted

Thanks for the replies.

 

I am currently set up to allow guests with my current smb.conf file.

 

I will try to mount my HDD to my home folder, hopefully tonight, and modify my conf file to reflect that.

 

Thanks again!

Posted

So I tried my hand at taking some of your advise and combining with other information I found out on the web.

 

I modified my fstab file to auto mount my HDD by UUID to /media/user/share

 

Getting it to mount in the designated folder works but when I try to mount it on a Windows machine, it still says that I don't have permission to access the folder.

 

Here is my smb.conf file.  I'm sorry that it is so long but I started with the sample configuration file and I know that at the very beginning, I changed some of the settings and they might be causing me the problems.

  Reveal hidden contents

After looking at this, I probably have issues with that "security" setting.  I thought that having "guest ok" set that it doesn't matter.

 

Thanks!

Posted

I got to modify my smb.conf file last night.  I removed the security and map to guest settings.  I also noticed in

RagnerBG's example that the folder name had to be in the path and the brackets above the stanza (i think that is the proper term).  So I modified that as well.

 

I now have access from a Windows machine and am starting to move files from my old Windows 7 machine serving files to my OrangePI PC server!!

 

Thanks for the help!

 

Here is my modified section:

[global]
netbios name = opiserver
server string = My Samba Share %v

[OPants]
comment = Orange Pi PC Server Share
path = /media/mickey/OPants
browseable = yes
writeable = yes
read only = no
guest ok = yes

 

Posted

I came into another possible hiccup.  I successfully mapped my new samba share on two different win7 machines but when I went to map it to a win10 machine, it said that I don't have permissions and I need to close all other connections.

 

At the time I was transferring files from my old win7 server to this one but I thought that I should still be able to at least map it and even access the files.

 

Any ideas?

Posted

I think you should check the permission of this folder - "/media/mickey/OPants", make it 777 for guests. But i would suggest you, to make it as simple, as possible. "guest ok = yes" - you don't need this, just add your user, as samba user (or create another user, only for samba sharing) and use - "valid users = <user_name>". "browseable = yes", "writeable = yes", i don't use this, so why should you? "read only = no" is enough. Try this config, as i already post above:

sudo smbpasswd -a <user_name>

[OPants]
path = /media/mickey/OPants
valid users = <user_name>
read only = no

That's all what i add and it's worked every time. And better change the sharing path to something in your samba user, Home directory, so you don't have to touch the permission. But i haven't deal with this joke - Win 10, so there may have some other surprise. Try to add the same workgroup, as on your Win 10 machine:

[global]
workgroup = WORKGROUP

 

Posted

From  the spanish link before, that I posted on mobile:

 

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = <name_of_the_server_on_your_network>
dns proxy = no
max xmit = 65535
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65535 SO_RCVBUF=65535
read raw = yes
write raw = yes
max connections = 65535
max open files = 65535

[UNIT_NAME]
comment = <you_share_description>
path = <path_to_share>
browsable = yes
guest ok = yes
read only = no
create mask = 666
directory mask = 777
force user = <your_user_here>
force group = users
printable = no
public = yes

 

 

You have to change:

 

netbios name = <name_of_the_server_on_your_network>
[UNIT_NAME]
comment = <you_share_description>
path = <path_to_share>
force user = <your_user_here>

 

 

Then execute this to change samba password for desired user:

 

smbpasswd -a <your_user_here>

 

 

Then you'll have two options to login in your server: As guest or using user/pass defined in command above.

Posted

I did as RagnerBG said and kept it simple.

 

I removed the lines that you don't have in your example.  I rebooted my machine and now the windows 10 machine can access the samba share.

 

Thanks!!!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines