1

I can't get access from the lan to a shared folder which is located on a second hard drive on an Ubuntu server.

I have installed Ubuntu server 15.04, Ubuntu is freshly installed on first hard drive sda, and second hard drive is sdb which I have formatted with ext4 and I have mounted and set it to automount everytime I reboot computer.

I have read numerous forums and for days I've been looking for a solution to share a folder or to share a whole drive so anyone can access it from lan without permissions, no luck.

I followed this solution http://www.liberiangeek.net/2014/07/ubuntu-tips-create-samba-file-server-ubuntu-14-04/

Which works when I share folder from Hdd where is Ubuntu installed, but when I do the same steps and change a path to another folder which is located in my second hard drive "/mnt/backup/share" I cant get access to it. I created user and specific group of users with full permissions to specific folder, and when I try to get access to from local network (pc with win7, win 8 and winxp) to access it on a prompt with username and password which I type in; I got also denied. What am I missing?

My smb.config

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
name resolve order = bcast host
dns proxy = no

[test2]
path = /mnt/backup/test2
browsable = yes
writable = yes
guest ok = yes
read only = yes

[tiki]
path = /mnt/backup/tiki
browsable = yes
writable = yes
guest ok = yes
read only = no

[tiki2]
path = /mnt/backup/tiki2
valid users = ocat
guest ok = no
writable = yes
browsable = yes
  • What are the permissions on the folder/files that you are trying to share on your second drive? You will need at least execute permission to traverse down into any directory tree. Can you post your smb.conf? – Eddie Dunn Nov 30 '15 at 21:52
  • @ Eddie Dunn here is my smb.conf [global] workgroup = WORKGROUP server string = Samba Server %v netbios name = ubuntu security = user map to guest = bad user name resolve order = bcast host dns proxy = no

    [test2] path = /mnt/backup/test2 browsable = yes writable = yes guest ok = yes read only = yes

    [tiki] path = /mnt/backup/tiki browsable = yes writable = yes guest ok = yes read only = no

    [tiki2] path = /mnt/backup/tiki2 valid users = ocat guest ok = no writable = yes browsable = yes

    – Ivan Badza Nov 30 '15 at 21:56
  • Where's your /mnt/backup/share added as a path in the smb.conf? You only have test, tiki, tiki2 and their sub directories. Nothing about share. And do "sudo service smbd restart" to restart the samba each and every time you change something in the conf. Otherwise the server will continue to run with the old conf. – user283885 Nov 30 '15 at 22:16
  • @user283885 its was a example sorry, in hese folders wich are in smb.conf i cant access. – Ivan Badza Nov 30 '15 at 22:19
  • I did numerous of times sudo service smdb restart and sudo nmdb restar, and restart whole ubuntu still cant get access to any of these – Ivan Badza Nov 30 '15 at 22:22
  • ubuntu has a wizzard a la window$ to configure samba. If you install system-config-samba ( and then fire that program from the desktop) you can try to use it to generate a proper conf file that way. First map a samba user ( or more) to a linux user, and then add shares with the proper permissions. Make sure the linux user has full rights to the actual folders. – user283885 Nov 30 '15 at 22:25
  • @user283885 if you mean on Samba Gui, i have tried that as well, doesnt work, same thing. Its strange that my smb.conf work on system hdd, when i share any folder example /samba/test, but on second hdd doesnt. – Ivan Badza Nov 30 '15 at 22:28
  • Yup that, then it sounds like a permsion problem with your second HDD. Is your second HDD mounted with the right permissions ? And do you have directory access on the full path? if you're denied access on any level samba will complain. – user283885 Nov 30 '15 at 22:31
  • @user283885 Im such a noob, didnt even look at Hdd premisions, now i have changed it from none to read and write, and voila it works... Thank you you are a life saver. 10 days i have spend to share it to find a cure and finaly i did :D thank you, thank you :D where i can give you points ? – Ivan Badza Nov 30 '15 at 22:35

1 Answers1

1

Im such a noob, didnt even look at Hdd premisions, now i have changed it from none to read and write, and voila it works... Thank you you are a life saver. 10 days i have spend to share it to find a cure and finaly i did :D thank you, thank you :D

  • I realize this is an old question, but you should accept your own answer or ask @Eddie Dunn to post his comment as an answer and accept it to show others that it is solved. These kinds of little courtesies helps make SE more usable for others looking for answers. – whitebeard Jun 23 '19 at 07:43
  • Or ask @user283885 to post his comment as an answer... Looks like his comment is the one you responded to. – whitebeard Jun 23 '19 at 07:52