Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with OS X file permissions on devices running other file system than "hfs"

Hi folks,


sorry for this detailed thread, but i tryed to gather all required information.


I am experiencing a total file / folder permission mess when i am using "rsync" to mirror folders from OS X to a NAS.


When i create a file test.rtf in OS X, the file premission looks like this:

8 -rw-r--r-- 1 flo staff 331 7 Mär 19:16 test.rtf


When i copy this file via finder to a OS X Extended (Journaled) formated firewire harddisc (hfs), the permission looks like:

8 -rw-r--r-- 1 flo staff 331 7 Mär 19:16 test.rtf


all cool.


When i copy this file via finder to a XFS formatted NAS (OS X interprets NAS's file system as a "smbfs"), the permission looks like:

2 -rwxrwxrwx 1 flo staff 331 7 Mär 19:16 test.rtf*


super uncool.


Now using rsync:

rsync'ing the initial file test.rtf from OS X to OS X Extended (Journaled) formated firewire harddisc, the permission looks like:


...flo$ rsync -av file-permissions-test/ /Volumes/officeWD/file-permissions-test/

building file list ... done

./

test.rtf


sent 471 bytes received 48 bytes 1038.00 bytes/sec

total size is 331 speedup is 0.64


8 -rw-r--r-- 1 flo staff 331 7 Mär 19:16 test.rtf


all cool.


rsyncing the initial file from OS X to to a XFS formatted NAS, the permission looks like:


2 -rwxrwxrwx 1 flo staff 331 7 Mär 19:16 test.rtf*


super uncool. (at least rsync and the finder copy operation does the same)


I assume the changed rights / permissions has to do with how a drive is formatted (hfs, ntfs, ext3) etc.?

When i sync to a linux on ext3 it the same problem.


So, is this all about file system, and will this problem be solved using a Time Capsule (is this thing running hfs and can i access it via network?)?

thank you!

Posted on Mar 7, 2015 11:26 AM

Reply
16 replies

Mar 7, 2015 5:21 PM in response to flowmac

You are talking about local, directly connected filesystems. When connecting to a networked system, everything is going to be a networked file system. Try the smbutil command line tool to see what version of SMB you are mounting. You are unlikely to see full functionality on anything other than an SMB2 volume and even then, all bets are off if you are mounting a NAS. It will be running some unknown version of the open source Samba. Apple is only going to support a Mac bound to a genuine Active Directory domain with Microsoft servers. For anything else, if you can read and write files, you are good to go.


You mentioned Time Capsule. You aren't trying to backup to this drive are you? Time Machine is black magic. Time Machine with a Time Capsule is serious voodoo. I would not trust my files to serious voodoo with an unsupported, open-source, reverse-engineered version of a file system on top of a completely foreign filesystem written by people who have sworn the death of the system you are using.

Mar 9, 2015 1:59 PM in response to flowmac

Thanks guys.

the switch -p does not change anything on the destination files in my test unfortunately, while -E makes the rsync command stop:

sync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at /SourceCache/rsync/rsync-42/rsync/rsync.c(244) [sender=2.6.9]

most likely, since the filesystem on NAS does not know how to handle this "Apple specific option"?

(my rsync version is rsync 2.6.9 protocol version 29)


@etresoft: Agreed, i do not trust TM at all. But you're saying that the apple #1 backup solution, TM in addition to TC, does not work properly? Is this based on experience or gut?

I'm thinking to use TC, which is running native OS X Journaled file system, to then rsync my files and folders to the TC - and i am expecting the exact and correrct attributes on the destination network share provided by the TC. Isn't this all right?

Mar 9, 2015 6:18 PM in response to flowmac

flowmac wrote:


Agreed, i do not trust TM at all. But you're saying that the apple #1 backup solution, TM in addition to TC, does not work properly? Is this based on experience or gut?

I'm thinking to use TC, which is running native OS X Journaled file system, to then rsync my files and folders to the TC - and i am expecting the exact and correrct attributes on the destination network share provided by the TC. Isn't this all right?

No. I think you've misunderstood. I am a big fan of Time Machine. It is black magic, but that's not bad thing. If you want to have trouble with Time Machine, connect it to a 3rd party NAS device or start making changes to it. Time Machine works best when you plug it in and let it go. I ran Time Machine with a 1st generation Time Capsule for a long time. The Time Capsule died eventually, but Time Machine never flaked out. People tell me that modern Time Capsules run even better. But the important takeaway is to flip the switch on Time Machine (however you connect it) and it it do its thing. Don't interfere. Don't try to do something with rsync. Just let it go.

Mar 12, 2015 2:50 PM in response to etresoft

ah, check, got it.

so i need one TC and aim TM to it, and another TC, running as a fileserver in LAN, right? --> i assume TM will use all the space on a TC for TM backups. Or is it possible to use two partitions on TC, one for TM, one for file services. (This is what i'd expect from a NAS, is this all right with TC, too?) thx

Mar 12, 2015 5:50 PM in response to flowmac

flowmac wrote:


ah, check, got it.

so i need one TC and aim TM to it, and another TC, running as a fileserver in LAN, right? --> i assume TM will use all the space on a TC for TM backups. Or is it possible to use two partitions on TC, one for TM, one for file services. (This is what i'd expect from a NAS, is this all right with TC, too?) thx

A Time Capsule has a USB port that you can use to plug in an external drive and share that. One volume would be for Time Machine and the other for whatever. It is only Time Machine that really needs a genuine Apple file server though. If you just want a fileserver, you don't have to use a Time Capsule. But the port is there if you want it.

Jul 28, 2015 1:53 AM in response to flowmac

Hi all,


i have to re-open this.

I have a Time Capsule now, which to my understanding is nativ HFS+ formatted.

When i copy a file, using finder "drag n drop" or rsync, from my local mac harddrive via ethernet to time capsule, the file permissions of the initial file are also gone.


original file on Desktop :

344 -rw-r--r--@ 1 flo staff 173263 18 Dez 2012 0.caf


copied by finder drag n drop or by rsync to time capsule:

344 -rwxrwxrwx 1 flo staff 173263 18 Dez 2012 0.caf*


In finder:

User uploaded file



Why should a simple copy job make a file "777", i don't get it. Can anyone with a Time Capsule double check, please? Thank you

Jul 28, 2015 4:28 AM in response to flowmac

Hello again flowmac,

By default, external partitions have permissions turned off. This is a network volume, but something similar is likely going on. Even if permissions are turned on, your network login may simply report everything as 777. It is nothing to be concerned about.


At TIme Machine volume is special, so you may see correct permissions there.

Jul 28, 2015 12:34 PM in response to flowmac

Nothing to be concerned about is one way to deal with it, okay. But when you move the file back from the TC to the mac, the permissions are still 777 🙂 I don't like that.


Plus, then it's all right to use a third party NAS since the result is the same, no file permissions are handled at all.

Just curious that this isn't a bigger concern for a Unix OS, thus inside the apple chain (OS X / Time Capsule).

If you use a firewire or usb harddisk with hfs+ / journaled, the permissions remain the same.

Jul 28, 2015 1:39 PM in response to flowmac

Hello again flowmac,

You have to remember that you are dealing with all kinds of different networking security mechanisms. The 777 actual refers to one specific mechanism that you aren't even using, NFS. Your Time Capsule uses AFP (AKA AppleTalk). Apple is now using Microsoft's SMB for any real client/server interactions. Just because it may appear to have 777 permissions on the server, and get reset to 777 after copying it back, does not mean that any user connected to said server can access the file.


My Time Capsule died years ago so I'm unable to test this. When I try to copy files from a Yosemite VM to my Yosemite system, the permissions are unchanged. What are your configuration settings for the Time Capsule file server? Are you entering an account and password to access these files? If not, then you may be connecting as a Guest user. That would explain the 777.


Even when my Time Capsule was still among the living, that was a few years ago. They may be using SMB now. This is a general "MacOS X Technologies" forum. I suggest you post your question in the Time Capsule forum instead: Time Capsule

Problem with OS X file permissions on devices running other file system than "hfs"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.