Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I hope this is a Superuser question and not for Server Fault. At work, we use a variety of Linux/Unix boxes. I mount these on my OS X Lion laptop via SMB. I've noticed when I work with files on the mount, the permissions will sometimes get changed so that only I can modify the files. This is obviously obnoxious for my co-workers but easy to fix.

The thing is not easy to fix is when I interact with SVN working copies that exist on the mounted boxes. They get corrupted beyond all repair (the '.svn' folder that contains all the meta data gets its permissions and flags ALLLL messed up). Every time I do an update or commit this happens.

I have heard there are some settings I could apply in SMB.conf to fix the problem but I don't know exactly what they should be. Everything seems to be geared for configuring OS X to be a share, but I guess what I am looking for is the SMB client config.

I don't have an /etc/smb.conf, I do have an /etc/smb.conf.old that came with the install but I am guessing it is not being applied. Will simply creating my own '/etc/smb.conf' force it to be applied even though I am the client and not the server?

How do I configure the SMB client to force permissions etc. after I work with files on the mount (and especially for creating directories as SVN does)? Can I configure it on a mount-to-mount basis or is there a global conf I can do that will apply to all of my SMB Mounts?

More info:

  • I work with these same boxes from Windows XP mounted as a network drive and do the same stuff (SVN etc) with no issues whatsoever.

  • The boxes I work with are running Linux - Red Hat Linux Advanced Server release 2.1AS (Pensacola)

share|improve this question
add comment

1 Answer

Have you considered bypassing SMB entirely and setting up AFP sharing on the servers?

Here's a quick guide for getting netatalk (an open source implementation of Apple's AFP server) running on Ubuntu. Shouldn't be difficult to do under Red Hat.

If you're depending on the permissions being accurate on the Linux machine, and you have user accounts set up with the appropriate groups and permissions, this might be the way to go.

I have a setup like this; multiple user accounts on the Linux machine, all users connecting from Macs, via AFP, using their Linux username and password. The files created on the Linux machine always have permissions as if they were created "natively" on Linux by the user.

Just out of curiosity, are you using NFS when accessing from Windows? Or SMB there too?

share|improve this answer
    
Thanks for the info Vickash! Unfortunately I am not the server admin, I might be able to get them to change their configuration for SMB but that would probably be the extent. As for Windows, I am using Windows XP and just used the 'Map network drive' option. Not sure which protocol that uses? –  mattacular Jun 29 '12 at 14:09
    
That'll be using SMB. After some trouble with Lion's SMB server (not the client), I set up that Linux box and gave up on SMB totally. One thing you can try though, and I don't remember exactly how this works, but tell your admin to ensure that the Linux FS permissions for your user match the permissions assigned in the SMB server, and that the proper create mask and directory masks are set for all users. This might be what's tripping Lion up. –  Vickash Jun 29 '12 at 22:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.