| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-21-2007, 07:20 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2007
Posts: 3
Rep:
|
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.
|
|
|
|
01-21-2007, 07:48 PM
|
#2
|
|
Moderator
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,505
Rep: 
|
Is admin the user you are using to connect over SMB?
|
|
|
|
01-21-2007, 08:35 PM
|
#3
|
|
LQ Newbie
Registered: Jan 2007
Posts: 3
Original Poster
Rep:
|
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
|
|
|
|
01-21-2007, 08:56 PM
|
#4
|
|
Moderator
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,505
Rep: 
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:00 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|