LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CentOS 4.7,Samba 3.0.28: Share folder is visible but error on accessing it. (https://www.linuxquestions.org/questions/linux-newbie-8/centos-4-7-samba-3-0-28-share-folder-is-visible-but-error-on-accessing-it-738463/)

lazybee26 07-07-2009 09:04 PM

CentOS 4.7,Samba 3.0.28: Share folder is visible but error on accessing it.
 
I looked at all the threads and have incorporated all the solns provided.But still cant get this working.

Problem
I'm simply looking to make a folder on my CentOS visible in readonly mode for everyone without any login.


Share name=pgdblogs

I can see the folder "pgdblogs" when I hit my server MYIP from my XP laptop. But when I double click the folder I get error
"\\MYIP\pgdblogs is not accessible.You may not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
No network provider accepted the given path."


smb.conf
---------
[global]
security = user
server signing = Auto
server string = ccs-stg-svr
map to guest = bad user

[pgdblogs]
path =/var/lib/pgsql/data/pg_log
case sensitive = no
read only = yes
guest ok = yes
guest only = yes
public = yes
writable = no
browseable =yes
hide unreadable = yes
msdfs proxy = no
hide dot files = yes


testparm - This is successful (Output below)
--------------------------------
[root@centos samba]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[pgdblogs]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
server string = ccs-stg-svr
map to guest = Bad User
server signing = auto

[pgdblogs]
path = /var/lib/pgsql/data/pg_log
guest only = Yes
guest ok = Yes
case sensitive = No
hide unreadable = Yes
msdfs proxy = no

SELinux
----------
I've changed the setenforce to permissive
setenforce 0

Firewall
-----------
This is turned off on my centos server, so probably not a firewall port enabling issue

Permissions on /var/lib/pgsql/data/pg_log (777)
------------------------------------------------
[root@centos pg_log]# ls -lah
total 108K
drwxrwxrwx 2 postgres postgres 44K Jul 7 00:00 .
drwx------ 11 postgres postgres 4.0K Jul 6 23:37 ..
-rwxrwxrwx 1 postgres postgres 458 Jul 1 10:25 postgresql-2009-07-01_000000.log
-rwxrwxrwx 1 postgres postgres 390 Jul 1 10:27 postgresql-2009-07-01_102718.log
-rwxrwxrwx 1 postgres postgres 0 Jul 2 00:00 postgresql-2009-07-02_000000.log
-rwxrwxrwx 1 postgres postgres 0 Jul 3 00:00 postgresql-2009-07-03_000000.log
-rwxrwxrwx 1 postgres postgres 0 Jul 4 00:00 postgresql-2009-07-04_000000.log
-rwxrwxrwx 1 postgres postgres 0 Jul 5 00:00 postgresql-2009-07-05_000000.log
-rwxrwxrwx 1 postgres postgres 420 Jul 6 23:13 postgresql-2009-07-06_000000.log
-rwxrwxrwx 1 postgres postgres 390 Jul 6 23:37 postgresql-2009-07-06_233735.log
-rwxrwxrwx 1 postgres postgres 0 Jul 7 00:00 postgresql-2009-07-07_000000.log"

xeleema 07-07-2009 09:43 PM

Two quick thoughts;

1) Seems like you want "Security=share", not "security=user".

2) I don't see a "workgroup=" anywhere in there. All of your Windows clients and your samba service will need to ride the same workgroup.

I actually found a Quick-n-Dirty over here.

Hope it helps!

lazybee26 07-08-2009 04:26 AM

I may be a little ignorant here, but what if we dont use windows workgroup and instead if I'm a domain user? I looked at my computer properties, and I only see domain. There's no workgroup name. Anyways, I added workgroup=XXX (our domain) and changed security=share. But I get same result

xeleema 07-08-2009 11:18 AM

Greetingz!
Regarding the "workgroup=", drop the ".lcl". You need to use the "Windows NT compatible" domain name (which should be in all caps).

However, if that doesn't work, you will probably have to setup Samba to utilize your Domain controllers, then go back and set the share to allow "@Domain Users" write access to it.

lazybee26 07-08-2009 07:33 PM

My network admin resolved this issue. Changed workgroup=WORKGROUP, security=share, added guest account=postgres

Updated and working smb.conf below for those trying to do something similar


[global]
workgroup = WORKGROUP
security = share
server string = ccs-stg-svr
map to guest = bad user
guest account = postgres
interfaces = lo eth0
bind interfaces only = true

[pgdblogs]
path = /var/lib/pgsql/data/pg_log
case sensitive = no
read only = yes
guest ok = yes
guest only = yes


All times are GMT -5. The time now is 09:34 PM.