How to Share Drive On Samba Fedora 25

asked 2017-02-21 23:21:41 -0500

eagarcia gravatar image

updated 2017-02-23 11:54:57 -0500

Hello everyone, I spent about four hours trying to figure out this problem, so I hope I can find the ultimate answer(s) here. I set up my Fedora 25 to share files over Samba, and have succeeded in doing so. I can share my home directory when I log in as the home directory's user. I tried sharing a hard drive/volume (formatted as BTRFS Raid 1) using UUID, but when accessing the Samba share from another computer it gives me the error "Not found or error, make sure address is correct". I know Samba is working well because I can send files to the home directory fine but not the hard drive/volume. I am pretty sure I have configured the firewall and SELinux properly for the folder to be used by Samba. I have done the following:

  1. Gave the share folder permissions of 777 for owner, group, and other.
  2. Tried accessing (in smb.conf) as /run/media/user/[UUID]/share, or /var/run/media/user/[UUID]/share, or /mnt/temp/share
  3. the share folder (and all children) have an SELinux label of samba_share_t
  4. # firewall-cmd --permanent --add-service=samba
  5. I made valid users to 'user', so there is no user mishap.
  6. Made /mnt/temp permissions to 777 for owner, group, and other. (Note: /mnt has 755 for root)
  7. I restarted Samba after every change and test to make sure conf was reloaded.

Here is my smb.conf for the share partition:

    comment = 'Hard Drive'
    browsable = yes
    path = '/mnt/temp/share'
    public = no
    write list = @Security
    writable = yes
    create mask = 0777
    Force create mode = 0777
    force group = @Security
    directory mode = 0777
    guest ok = no
    valid users = @Security
    force user = user

I tried disabling SELinux temporarily using:

# setenforce 0
# systemctl restart smb nmb

... but the folder is still inaccessible, so my guess it's a permissions issue, but share has 777.

edit retag flag offensive close merge delete