views:

285

answers:

1

We recently switched from using PCs at work to Macs, so I'm new to the *nix way of doing things. I have the default Apache running that shipped with 10.5, but I've noticed that when I drag files from a Windows server to my machine, the permissions are changed. Specifically, I'm writing data to an XML file, and occasionally after swapping some files back and forth, it stops working.

Can someone help me understand why this is happening and how I can either force Windows to respect the original file permissions (they were set on my machine when I created the file) or apply a less secure set of default permissions when the files are moved from Windows to Mac?

A couple facts to be aware of:

  • I'm using the Cornerstone Subversion client.
  • I can use Terminal if you spell it out for me.
  • Ultimately I'm uploading these files via Transmit to a Linux server in another location.
  • I'm already familiar with using Get Info to change the file permissions, but maybe I'm doing something wrong.
  • I'm logged in as root. (I know, bad bad bad.)

I should also mention I know this is a simple question that should have a simple answer, but I've googled up and down without finding it. I need your help.

Thanks.

+1  A: 

It would be incredibly helpful if you could drop to the Terminal, use cd to navigate to the folder with the files that don't work because of permissions and then type: ls -l (those are both lowercase Ls back there).

If you start from your home folder, it'll look something like this:

macbookpro:~ artlogic$ cd Sites
macbookpro:Sites artlogic$ ls -l
total 8
drwxr-xr-x  6 artlogic  staff   204 Mar 11  2008 images
-rw-r--r--  1 artlogic  staff  2628 Mar 11  2008 index.html
macbookpro:Sites artlogic$

Please paste the output into this thread. Knowing what Apache is changing the permissions to would help.

On a side note, Apache generally runs under a different user and permission level than the logged in user and so if it's somehow creating or overwriting files it may be changing the permissions that way.

Thanks, James. That's useful information. What I'm looking for is an explanation of why permissions are being changed and, if possible, how I can prevent that behavior.
Nathan Peretic
Sorry - I actually meant to ask you to paste your output into your comment so we can see what the permissions are being changed to.