LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 03-31-2004, 11:17 PM   #1
klugenratte
LQ Newbie
 
Registered: Aug 2003
Location: Madison, WI
Posts: 4

Rep: Reputation: 0
Question Linux Samba Share and Mac OS X - Files Disappearing?


We have a Red Hat 8.0 system using Samba 2.2.7 to act as a simple file server for a few Mac OS X 10.3.3 users.

Typically, the users can access the share without any problems. However, occassionally the users encounter bizarre problems with files disappearing or access denied messages. These problems occur regardless of the file type. When these problems occur they can result in hours of work lost and very pissed off users, who then speak to their manager who then speaks to their VP who then speaks to my department's VP who then calls several hours of meetings to find out why we aren't providing quality support to the end users. All in all it's a waste of everyone's time and no one goes home happy.

Any help would be greatly appreciated.

TIA.

Examples:

1. User opens an existing file on the server and makes some changes to it. When user then tries to save the file, the user receives a message stating the file is not found. If the user browses the directory, indeed the file is not listed. However, if the user does a 'Save As', the file can be saved without problem.

2. User drags a file to their desktop to work on it locally. After they have finished working and saved their changes, they then try to drag the file back to the share. At which point everything indicates that the file is being moved to the share and the file disappears from the desktop as expected. However, when they look for the file on the share, it is not there.

3. User tries to rename a file on the share and receives an access denied message. No one else has the file open or is experiencing any errors. Only minutes earlier the file could be renamed without error and a couple hours later the file can be renamed without error. No perceivable changes have occured in the interim and no systems have been restarted.

4. User moves files between directories on the share. About 50% of the files moved maintain their program associations, the other 50% of the files lose their associations. No perceivable pattern has been found as to which files keep and which files lose their associations.

smb.conf file:

# Samba config file created using SWAT

# from dali (127.0.0.1)
# Date: 2004/03/24 09:42:52

# Global parameters
[global]
workgroup = GEMPLERS
netbios name = DALI
server string = Dali - Creative Department File Server
interfaces = 172.16.0.72/24 172.16.0.73/24
encrypt passwords = Yes
min passwd length = 6
obey pam restrictions = Yes
password server = *
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*success
fully*
unix password sync = Yes
admin log = Yes
log file = /var/log/samba/%m.log
max log size = 4096
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
load printers = No
show add printer wizard = No
dns proxy = No
wins server = 172.16.0.10
remote announce = 172.16.255.255 172.17.255.255 172.18.255.255 172.20.255.255
hosts allow = 172.16. 172.17. 172.18. 172.20. 127.
printing = lprng

[creative]
comment = Creative Department Main File Repository
path = /share01/creative
valid users = root, backup, pc-x1001, pc-x1002, pc-x1003, pc-x1004, pc-x1005, pc-x1006
admin users = root
write list = root, backup, pc-x1001, pc-x1002, pc-x1003, pc-x1004, pc-x1005, pc-x1006
force group = duluth
inherit permissions = Yes
hide dot files = No

__________________
Josh Graves, RHCT
---
When you earnestly believe you can compensate for your lack of skill by doubling your efforts, there is no end to what you can't do.
 
Old 03-31-2004, 11:18 PM   #2
klugenratte
LQ Newbie
 
Registered: Aug 2003
Location: Madison, WI
Posts: 4

Original Poster
Rep: Reputation: 0
Question Linux Samba Share and Mac OS X - Files Disappearing?

*ZOT!*

Last edited by chort; 04-01-2004 at 09:09 PM.
 
Old 04-01-2004, 09:23 AM   #3
JUSTAUSER
LQ Newbie
 
Registered: Oct 2003
Posts: 3

Rep: Reputation: 0
Linux Samba Share and Mac OSX

Sorry this is not a solution but I will be trying to hook an EMac into our RH 9.0 Linux box very soon. It is an ethernet network using TCP/IP with a Windows NT 4.0 box authenticating users. Any recommendations?
 
Old 04-01-2004, 02:31 PM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
It sounds like a network problem. Maybe bad cable, switch, or hub. Or even the NIC.
 
Old 04-01-2004, 04:39 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
It definitely sounds like a weird problem, I've never heard anything like that before... It could be a network problem, or possibly file system? What file system is the backend on that you're mounting with Samba?

Have you tried running a network sniffer (such as Ethereal) while the problems are happening? MacOS X has tcpdump built in, so you could do something like:
$ sudo tcpdump -i en0 -n -s 1500 -X

Also, have you tried looking at your smbd.log and/or nmbd.log, and also the log that partains to the individual user from the time frame when they had a problem?
 
Old 04-01-2004, 07:58 PM   #6
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

Direct replies to:

http://www.linuxquestions.org/questi...hreadid=164789

Cheers,

Finegan
 
Old 04-01-2004, 09:04 PM   #7
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
klugenratte,

Please post to only one forum per problem. I fixed up your mess, don't do it again!

Last edited by chort; 04-01-2004 at 09:09 PM.
 
Old 04-02-2004, 02:53 AM   #8
shahriar
LQ Newbie
 
Registered: Dec 2002
Posts: 18

Rep: Reputation: 0
THIS IS NOT A SOLUTION

but I'd like to know a few things to understand your problem better -- as you have mentioned a good many numbers of problems.

1. -- are you running NetATalk (aka AppleTalk for *nix) in your RH box?

2. -- are the users using such unusual usernames (as opposed to their regular usernames) to log in to their mac systems as you have mentioned in your samba.conf file (pc-x1001, pc-x1002, pc-x1003, pc-x1004, pc-x1005, pc-x1006)?

3. is your /share01/creative a seperate partition in the HDD (i.e., /dev/sd7) and does it reside at root or is it part of yet another file system (maybe originally it is located at /tmp/share01/creative -- please forgive me if I sound naive, but please be patient and check it)

4. What are the attributes of the directories both /share01 and /share01/creative

5. Did you notice anything -- ANYTHING -- unusual either at smb.log or the user's log file for samba so far?

please do answer and maybe we can deduce the problems.

Thanks.
 
Old 04-02-2004, 09:28 AM   #9
klugenratte
LQ Newbie
 
Registered: Aug 2003
Location: Madison, WI
Posts: 4

Original Poster
Rep: Reputation: 0
[OT] When X-Posting Makes Sense

Quote:
Originally posted by finegan
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

Direct replies to:

http://www.linuxquestions.org/questi...hreadid=164789

Cheers,

Finegan
Thank you for your courteous reply.

While I agree that cross posting is a no no, there are times when it is justified. The problem I posted could be networking, or it could be FreeBSD (Mac OS X) related. Non-moderator users typically find questions they can answer by browsing; they don't typically perform searches for topics they can provide answers for, just those they need answers for. Since the underlying cause of this problem is unknown, it is important that the opportunity exist for any users with a solution to post it. Whether the user is one who typically only browses the *BSD forums, the networking forums, or both.

So, what is the proper solution to attracting the attention of people of multiple forums to a potentially related post, without cross posting to some degree?
 
Old 04-02-2004, 10:00 AM   #10
dannybpng
Member
 
Registered: Sep 2003
Location: USA
Distribution: Fedora 20
Posts: 60

Rep: Reputation: 19
Problem seen before

I don't run a Mac, but have seen strange problems in names of files created by a Mac on a Windows/Linux (SAMBA) server. You might want to look at the following web pages which point to a problem on the MAC when using SAMBA.

http://www.macwindows.com/jaguar.html
http://docs.info.apple.com/article.html?artnum=25405

Hope this helps.
Dan
 
Old 04-02-2004, 01:04 PM   #11
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
klugenratte,

I am sorry but double or cross posting can not be justified. The most relevent forum is the proper place for it.

The reason is due to the people looking at the problem and giving responses in two different threads is a waste of resources. It could be either redundant or head off in a direction that has already been ruled out. People spend a lot of time looking for some of the solutions here, and receive notification emails to monitor the progress. They would certainly get discouraged if they found that it was stated in the other post that it was only a cable unplugged or something like that.

We would merge the two threads or close one of them to prevent this from happening.

Problems like this one are pretty much not distro related.
 
Old 04-02-2004, 11:23 PM   #12
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
My wife works in a mac environment which also recently started using a samba server (on a solaris box I think), They have tons of problems with it on the mac.. some people have the problem others dont.. and it switches.. not one person always has the problem.. not one person never has a problem...

Very strange.. however.. the PC's the mac people use as well have no issues at all with the same server... go figure...
 
Old 04-03-2004, 02:48 AM   #13
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
It's no doubt that something on the mac is not working. I'm not a mac person at all, but I believe there are two files created for each file that goes on a mac. Not sure why that is but it is likely to be the problem. It must do some dividing up of the data and some character is not correctly converted.

It would figure someone would try to blame it on Samba.

I also saw some of these symptoms with a bad nic before using windows to access Samba shares. Windows spews out all sorts of errors like disk full and file permission errors when this occurs.

Samba is a very good server if you have it setup right. At least for windows clients it is.
 
Old 04-05-2004, 11:09 AM   #14
klugenratte
LQ Newbie
 
Registered: Aug 2003
Location: Madison, WI
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by shahriar

1. -- are you running NetATalk (aka AppleTalk for *nix) in your RH box?
No, straight TCP/IP.

Quote:
Originally posted by shahriar

2. -- are the users using such unusual usernames (as opposed to their regular usernames) to log in to their mac systems as you have mentioned in your samba.conf file (pc-x1001, pc-x1002, pc-x1003, pc-x1004, pc-x1005, pc-x1006)?
They are logging on to their Macs as pc-x1001, etc...

Quote:
Originally posted by shahriar

3. is your /share01/creative a seperate partition in the HDD (i.e., /dev/sd7) and does it reside at root or is it part of yet another file system (maybe originally it is located at /tmp/share01/creative -- please forgive me if I sound naive, but please be patient and check it)
/share01 is a root level partition of a SCSI drive formatted as ext3. The only other partition on the drive is an FTP partition. The drive is set up with hardware RAID (It's either RAID 1, RAID 5, or RAID 1+0. I need to reboot to confirm).


Quote:
Originally posted by shahriar

4. What are the attributes of the directories both /share01 and /share01/creative
/share01 - 755 - root:root
/share01/creative - 770 - root:duluth (propogates to subdirectories)

Quote:
Originally posted by shahriar

5. Did you notice anything -- ANYTHING -- unusual either at smb.log or the user's log file for samba so far?
Everything looks okay in the smbd and nmbd log files. Here's a user log file.

[2004/03/29 10:23:35, 0] smbd/dir.c:dptr_close(277)
Invalid key 0 given to dptr_close
[2004/03/29 10:23:35, 0] smbd/dir.c:dptr_close(277)
Invalid key 0 given to dptr_close
[2004/03/29 10:23:36, 0] smbd/dir.c:dptr_close(277)
Invalid key 0 given to dptr_close
[2004/03/29 15:24:59, 0] lib/util_sock.c:read_data(436)
read_data: read failure for 4. Error = No route to host
[2004/03/30 13:34:45, 0] smbd/dir.c:dptr_close(277)
Invalid key 0 given to dptr_close
[2004/03/30 13:34:45, 0] smbd/dir.c:dptr_close(277)
Invalid key 0 given to dptr_close
[2004/03/30 13:34:45, 0] smbd/dir.c:dptr_close(277)
Invalid key 0 given to dptr_close
[2004/03/30 16:15:08, 0] lib/util_sock.c:read_data(436)
read_data: read failure for 4. Error = No route to host
[2004/03/31 16:36:38, 0] lib/util_sock.c:read_data(436)
read_data: read failure for 4. Error = No route to host
[2004/04/01 16:11:10, 0] lib/util_sock.c:read_data(436)
read_data: read failure for 4. Error = No route to host
 
Old 04-06-2004, 02:55 PM   #15
synt4x
LQ Newbie
 
Registered: Apr 2004
Posts: 1

Rep: Reputation: 0
I'm also running into a very similar problem. I've already submitted it to the samba mailing lists (and seen others with the same issue) but without any luck. It's caused by macos's "resource forks" (for normal file, metadata is stored here). Mac's save their resource fork for a given file 'blah' in ._blah. The problem occurs when these resource forks get locked by the OS, but never released. If you think you have this problem, run the following command:

smbstatus -L
Code:
14853  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/._prototype_notification.doc   Tue Apr  6 10:43:21 2004
14855  DENY_NONE  0x1         RDONLY     NONE             /files/Madacy/nwf.madacydvd.com/proto1/images/._product_dolphin.jpg   Tue Apr  6 11:08:04 2004
14861  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/proto1/pages/._practice.php   Tue Apr  6 10:47:51 2004
14861  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/proto1/pages/._mccoy.php   Tue Apr  6 10:47:51 2004
14861  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/proto1/pages/._disclaimer.php   Tue Apr  6 10:47:51 2004
14853  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/proto1/images/._arthritis.jpg   Tue Apr  6 10:41:18 2004
14861  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/proto1/pages/._vernace.php   Tue Apr  6 10:47:51 2004
14855  DENY_NONE  0x1         RDONLY     NONE             /files/Madacy/nwf.madacydvd.com/proto1/images/._product_animalbaby.jpg   Tue Apr  6 13:21:19 2004
14853  DENY_NONE  0x1         RDONLY     NONE             /files/HCMG/mainline/proto1/images/._door.jpg   Tue Apr  6 10:41:18 2004
etc...
it will list out all the current locked files. Most of them will be ._ files

A few of the suggested fixes to this include:
disabling oplocks, kernel oplocks, and level 2 oplocks:
Code:
   kernel oplocks = no
   level2 oplocks = no
   oplocks = no
This does not work.

Deleting the resource forks as they are created
Code:
delete veto files = yes
veto files = /._*/
This does not work as well.

If anyone does find a solution to this, please send a mail over to smb@asdfghjkl.org

Last edited by synt4x; 04-06-2004 at 02:56 PM.
 
  


Reply

Tags
mac, 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
Cannot share files using samba on slack 10.1 alamuru420123 Slackware 7 03-22-2005 03:18 AM
Cannot create files on samba share jhoderd Linux - Software 2 01-04-2005 09:46 AM
Samba PDF share disappearing antwoneeter Linux - Software 2 10-04-2004 10:49 PM
The disappearing and appearing linux machine using Samba. Tiyogi Linux - Networking 0 04-06-2004 10:16 AM
Don't share .files with Samba objorkum Linux - Software 1 02-28-2004 08:48 AM


All times are GMT -5. The time now is 08:41 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration