LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2013, 08:44 PM   #1
bellj
LQ Newbie
 
Registered: Mar 2013
Location: East Coast
Distribution: RHEL, Centos and Ubuntu
Posts: 5

Rep: Reputation: Disabled
Cool Samba access denied


Hi i have installed Samba on Centos 6.4 and having share problems.
I can see all the shares but cant access the media share.
I get the error access denied. My smb.conf looks like this:

[business]
comment = Business
path = /home/business
read only = no
browseable = yes
valid users = bellj

[media]
comment = media files
path = /media/server
writable = no
browseable = yes
public = yes
guest ok = yes
; valid users = bellj

I can access the business share but not the media share.
Can anyone give me some pointers on this one?
 
Old 03-24-2013, 09:52 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Can you check what are the original permissions and ownership on /media/server? Perhaps you have read access on /home/business but not on /media/server.
Code:
~$ ls -ld /media/server
 
Old 03-25-2013, 04:14 PM   #3
bellj
LQ Newbie
 
Registered: Mar 2013
Location: East Coast
Distribution: RHEL, Centos and Ubuntu
Posts: 5

Original Poster
Rep: Reputation: Disabled
Cool

drwxrwxr-x+ 14 bellj users 4096 Feb 19 16:05 /media/server
 
Old 03-26-2013, 04:14 AM   #4
maccas17
Member
 
Registered: May 2010
Location: UK
Distribution: RHEL6
Posts: 70

Rep: Reputation: 11
Have you checked your smb.conf is ok?

Code:
testparm -s
 
Old 03-26-2013, 06:00 AM   #5
bellj
LQ Newbie
 
Registered: Mar 2013
Location: East Coast
Distribution: RHEL, Centos and Ubuntu
Posts: 5

Original Poster
Rep: Reputation: Disabled
Cool

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[business]"
Processing section "[media]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
idmap config * : backend = tdb
cups options = raw

[homes]
comment = Home Directories
read only = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
print ok = Yes
browseable = No

[business]
comment = Business
path = /home/business
valid users = bellj
read only = No

[media]
comment = media files
path = /media/server
guest ok = Yes
 
Old 03-26-2013, 06:06 AM   #6
jitendra.sharma
Member
 
Registered: Mar 2013
Location: ahmedabad
Distribution: CentOS, Ubuntu, Debian
Posts: 92
Blog Entries: 1

Rep: Reputation: Disabled
It may be your selinux problem
if your selinux enable then u have to add selinux context to access -
just follow this commands
#chcon -t samba_share_t /media/server
and confirm with:-
#ls -Z /media

and "writable = yes" instead of "writable = no" in your smb.conf file..

Last edited by jitendra.sharma; 03-26-2013 at 06:40 AM.
 
Old 03-26-2013, 06:23 AM   #7
sharadchhetri
Member
 
Registered: Aug 2008
Location: INDIA
Distribution: Redhat,Debian,Suse,Windows
Posts: 179

Rep: Reputation: 23
This I did in CentOS 6.3, it may help you.
Seems problem might be with selinux

http://sharadchhetri.com/2013/02/17/...r-in-centos-6/
 
Old 03-26-2013, 07:00 AM   #8
bellj
LQ Newbie
 
Registered: Mar 2013
Location: East Coast
Distribution: RHEL, Centos and Ubuntu
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thanks everyone. I looks like Selinux was the problem.
I thought if is ran "service iptables stop", it could not be involved.
It is all working now.
Thanks again
 
  


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
Samba Client Access Denied TKS Linux - Software 8 01-15-2008 06:17 AM
Access denied when attempting access samba share warlockvix Linux - Software 1 05-11-2007 02:36 PM
Samba Access Denied Harriskaver Linux - Software 7 05-07-2006 01:43 AM
samba/swat access denied bob_man_uk Linux - Software 2 10-19-2005 03:12 AM
Samba - Access denied aikempshall Linux - Networking 22 08-24-2004 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 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