Setting up Samba on Fedora 7

I decided to set up Samba so that I can use access my files on my linux PC from other PCs.
How’s how:

[root@localhost ~]# yum install samba
[root@localhost ~]# /etc/init.d/smb restart

The lines above will install and start Samba. The default config will allow each user access to their home directories, so you should now be able to access the share from a windows pc.
On the Windows PC press Start then select run and enter \\192.168.0.1 (or whatever the hostname or ip address of the Samba server). A folder will appear showing a directory with your home directory, and maybe some other shares such as printers. Navigating into the home folder should show your files, but this didn’t work for me. Instead Windows showed an error saying that the sahre does not exist and the following error was shown in the samba log file:

[root@localhost ~]# tail /var/log/samba/log.192.168.0.2
[2009/02/05 18:48:27, 0] smbd/service.c:make_connection_snum(1003)
'/home/user' does not exist or permission denied when connecting to [user] Error was Permission denied

As it turns out this was SELinux (access control system) was preventing the access due to the default policies. The following allowed the access and the share was then accessible from windows:

[root@localhost ~]# setsebool -P samba_enable_home_dirs on

This entry was posted in Linux and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>