LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba access denied (https://www.linuxquestions.org/questions/linux-newbie-8/samba-access-denied-4175455424/)

bellj 03-24-2013 08:44 PM

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?

shivaa 03-24-2013 09:52 PM

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

bellj 03-25-2013 04:14 PM

drwxrwxr-x+ 14 bellj users 4096 Feb 19 16:05 /media/server

maccas17 03-26-2013 04:14 AM

Have you checked your smb.conf is ok?

Code:

testparm -s

bellj 03-26-2013 06:00 AM

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

jitendra.sharma 03-26-2013 06:06 AM

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..

sharadchhetri 03-26-2013 06:23 AM

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/

bellj 03-26-2013 07:00 AM

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


All times are GMT -5. The time now is 10:14 AM.