Linux Samba Share and Mac OS X - Files Disappearing?
Linux - SoftwareThis 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
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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?
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.
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.
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.
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?
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.
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.
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...
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.
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
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
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.