LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-10-2009, 03:10 PM   #1
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Rep: Reputation: 0
permissions issue with Samba and CentOS 5.2


I'm pretty new to Linux so sorry if I seem to be asking an easy question. I have searched for the answer and have not been able to find one so far.

I have CentOS 5.2 installed and have attempted to set up a Samba share.

It keeps telling me that "the share is not accessible. You might not have permissions to use this network resource."

I know that the user should have the permissions cause I have used Webmin to set up the Samba users to match the Unix users and have used the chmod command to set the directories permissions to 777 and ls -l shows the shared file as having drwxrwxrwx.

I started out trying to connect from my OSX 10.5 laptop and that didn't work. Moved on to OSX 10.4, still nothing, then tried my XP machine and still nothing.

I have read about and will be trying Netatalk for the OSX machines but i have no clue how to get the Windows machine connected.

Thanks in advance,
Hotrock3
 
Old 01-10-2009, 03:21 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
As root from a terminal, turn selinux off (setenforce 0), then try and report back.

Turn selinux back on with setenforce 1.

Can you also post your smb.conf?
 
Old 01-10-2009, 04:58 PM   #3
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
SWEET!!

Okay, that did it.

Being as I'm pretty new at this do you mind explaining why that work?
If so that would be amazing.

Thanks once again,
Hotrock3
 
Old 01-10-2009, 05:13 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'll give you a bit of SELinux reading instead https://fedoraproject.org/wiki/SELinux

We haven't solved the problem though, since I'd recommend you don't permanently disable SELinux.

You'll notice in your smb.conf there are some SELinux notes
Quote:
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba-share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
#
If you were trying to access you home dir, then simply follow the advice given
Code:
setsebool -P samba_enable_home_dirs on
as root

If you have created a new directory, use
Code:
chcon -t samba_share_t /path
Then turn selinux back on (setenforce 1)
 
Old 01-10-2009, 08:59 PM   #5
hotrock3
LQ Newbie
 
Registered: Dec 2008
Location: Nampa, Idaho
Posts: 20

Original Poster
Rep: Reputation: 0
wow, the reading helped a lot, well now I have selinux back up and I can still access the samba share, thanks so much.
Hotrock3
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
repost - Apache 2.2.3 on Centos 5 (RHEL5) permissions issue djjoshuad Red Hat 2 04-19-2007 04:47 AM
Samba Permissions Issue... I'm So Close, Please Help! balzack Debian 11 02-21-2006 08:53 AM
Another samba permissions issue... but at least I searched! gauge73 Linux - Networking 11 08-05-2005 06:32 PM
Samba shares permissions issue jamespetts Linux - Software 19 04-19-2003 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration