LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-21-2007, 07:20 PM   #1
Robert Moyer
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Samba only shares directories on system disk


I just moved my samba services from a box running RH9 to one running Fedora Core 6. This move involved two parts: I physically moved the internal drive containing the data I shared to a PC client (an ext3-formatted filesystem) and also moved the /etc/samba/smb.conf config file. I then proceeded to share the volume using the version of samba which shipped with FC6.

What's happened is that when I share a directory from the system disk, everything works fine. But when I mount the file system from the second drive over that directory, the PC client can't access it. The PC error message is something to the effect that the "network path was not found".

The stanza from smb.conf is:
[d]
path = /d
writeable = yes
public = yes
hosts allow = 192.168.1.25 192.168.1.26 192.168.1.27
guest ok = yes
guest account = admin

1. If /d is a directory on the system disk, with permissions set to 777, then the PC can read and write in /d via samba. Here's output from df and ls:

# df /d
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 35807336 25607332 8351728 76% /
# ls -ald /d
drwxrwxrwx 2 root root 4096 Jan 21 11:35 /d



2. If I mount the internal drive over /d, again with permissions set to 777, then the PC gets the error above. Here's output from df and ls

#mount /dev/hdd /d
# df /d
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdd 76923000 18879456 54136008 26% /d
# ls -ald /d
drwxrwxrwx 13 root root 4096 Jan 21 13:25 /d


Both the system disk (hda3) and the internal data disk (hdd) are ext3. I do a "service smb restart" before the mount. The mount options for /dev/hdd are the defaults.

When /dev/hdd is mounted on /d, it can be shared in RW mode to other linux clients via NFS with no problems. The local uid "admin" has no problem accessomg the data on /d.


If I set loglevel=3 in the smb.conf, the error message looks like this:

'/d' does not exist or permission denied when connecting to [d] Error was Permission denied
[2007/01/21 18:44:44, 3] smbd/sec_ctx.c:set_sec_ctx(241)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/01/21 18:44:44, 3] smbd/connection.c:yield_connection(69)
Yielding connection to d
[2007/01/21 18:44:44, 3] smbd/error.c:error_packet(146)
error packet at smbd/reply.c(676) cmd=117 (SMBtconX) NT_STATUS_BAD_NETWORK_NAME



Any ideas would be appreciated.
 
Old 01-21-2007, 07:48 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Is admin the user you are using to connect over SMB?
 
Old 01-21-2007, 08:35 PM   #3
Robert Moyer
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I found the answer.

It appears that I stumbled across the answer. Or perhaps not the answer, but something which works and which requires more complete understanding. The trick was to disable SE for Samba with this command:

/usr/sbin/setsebool -P smbd_disable_trans 1

This nugget was provided by member billybadfoot in this thread:
forums>linus>linux-general>"unable to access files from XP via samba after upgrade to FC6". Look at #8 in this thread, and the supporting references. The more I read, the more I think my problem was just one particular manifestation of problems which SE create for Samba in FC6.

Robert
 
Old 01-21-2007, 08:56 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by Robert Moyer
It appears that I stumbled across the answer. Or perhaps not the answer, but something which works and which requires more complete understanding. The trick was to disable SE for Samba with this command:

/usr/sbin/setsebool -P smbd_disable_trans 1

This nugget was provided by member billybadfoot in this thread:
forums>linus>linux-general>"unable to access files from XP via samba after upgrade to FC6". Look at #8 in this thread, and the supporting references. The more I read, the more I think my problem was just one particular manifestation of problems which SE create for Samba in FC6.

Robert

Ah, the wonderful SELinux. Always trips people up, it seems. That being said, I'm glad you fixed your problems and (every bit as importantly) posted the solution so that others may be helped. For the future reference of you and others, here's the post you referred to above: http://www.linuxquestions.org/questi...52#post2574152
 
  


Reply

Tags
samba


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 shares all home directories arapidsfan Linux - Server 6 10-05-2006 05:42 PM
10.0 beta 4 tiny niggle -- SAMBA shares don't display all the directories 1kyle Suse/Novell 1 09-10-2005 01:12 PM
Samba does not allow writing to public shares / browsing home directories disallowed Xolo Linux - Software 6 02-14-2005 04:22 PM
Accessing samba shares through dos boot disk Tap-Out Linux - Software 0 12-08-2003 11:20 AM
Why can't I see the files in the directories on my Samba-Shares? Asuka Tabi Linux - Software 1 06-21-2001 01:10 PM


All times are GMT -5. The time now is 03:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration