LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux Samba Share and Mac OS X - Files Disappearing? (http://www.linuxquestions.org/questions/linux-software-2/linux-samba-share-and-mac-os-x-files-disappearing-164789/)

klugenratte 03-31-2004 10:17 PM

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.

klugenratte 03-31-2004 10:18 PM

Linux Samba Share and Mac OS X - Files Disappearing?
 
*ZOT!*

JUSTAUSER 04-01-2004 08:23 AM

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?

DavidPhillips 04-01-2004 01:31 PM

It sounds like a network problem. Maybe bad cable, switch, or hub. Or even the NIC.

chort 04-01-2004 03:39 PM

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?

finegan 04-01-2004 06:58 PM

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

chort 04-01-2004 08:04 PM

klugenratte,

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

shahriar 04-02-2004 01:53 AM

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.

klugenratte 04-02-2004 08:28 AM

[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?

dannybpng 04-02-2004 09:00 AM

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

DavidPhillips 04-02-2004 12:04 PM

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.

trey85stang 04-02-2004 10:23 PM

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

DavidPhillips 04-03-2004 01:48 AM

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.

klugenratte 04-05-2004 10:09 AM

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

synt4x 04-06-2004 01:55 PM

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


All times are GMT -5. The time now is 08:52 AM.