I am using netatalk on my Pi (running Raspbian) to allow access from my Mac. This has been working well for my Home directory, but I have tried to get access to the Pi root without success.

I can connect OK, and see all the root directories, but not their contents. If I change the path from / to /etc I can see the contents, and subdirectories.

The relevant content of AppleVolumes.default

:DEFAULT: options:upriv,usedots

# By default all users have access to their home directories.
~/                      $hHome

:PIROOT: options:upriv,usedots,ro
/etc                    "$hRoot"

Any advice to access root would be appreciated. I am not sure if this is the best site for the question. I will try others if no one hare can help.

  • @Winterflags It would have been smarter to ask about this on U&L rather than placing a bounty here -- unless Milliways has already solved this and posts and answer, of course. – goldilocks Nov 2 '15 at 12:56
  • @goldilocks Oh okay. I hope someone sees the question. – PAN Nov 2 '15 at 13:17
  • 1
    I'd recommend using sshfs to mount your pi's drive on your mac with macfusion. – raspi-ninja Nov 5 '15 at 4:29

This is just a guess, but I think your connecting User has no rights to write to /.

Netatalk needs the connecting user to be able to r/w to /.AppleDouble which is a folder where files metadata/resource forks are kept.

  • Or it's a bug being talked about here

  • A workaround would be to just list all directories of / in your AppleVolumes.default

| improve this answer | |
  • Thanks for your reply. How can I give the connecting (OS X) user r/w permissions to ~/.AppleDouble? – PAN Nov 14 '15 at 21:16
  • Wasn't the issue more that the user wants to login as 'root' so everything is open across Netatalk to the storage of the PI. This enables them to make modifications using the Mac finder and some powerful editors like TextWrangler instead of dealing with the PI's command line editors. Looking for same myself.... – William Cerniuk Nov 5 '17 at 15:13
  • the 'root' account should not be used by a human. on iOS, one should always use the 'mobile' user. – Gotschi Nov 6 '17 at 14:44

You can't login as root user to see the entire contents of the pi's storage. There is code in Netatalk that prevents the root user from logging in.

If you do share the root of the storage system via Netatalk, and if your folder is at the root of the disk and if that folder permits the logged in Appletalk user to list it's content, Netatalk filters that folder out of the listing under the root of the storage aka "/". Aggravating.

For example, if you tell Netatalk to share the root of the storage by adding:

/               "π Tin"

to the /etc/netatalk/Applevolumes.default file on your pi before the # End of File you will likely see a nearly empty volume = your when you open the π Tin volume from your Mac (aka file share, shared folder):

enter image description here

Then for fun, set the "execute" bit off on the /man directory on your pi like this:

sudo chmod o-x /man

That directory or "folder" should have shown under the π Tin volume with a whole bunch of others when you first opened it...but it didn't. Now, after executing the command line above and then opening the π Tin volume, you will magically see the "man" folder show up:

enter image description here (you may have to "disconnect" and "reconnect" from your Mac to see the changes faster)

But because you told the pi's file system to not allow "others" to "execute" aka display folder contents listing, you can't open it from your Mac regardless of the "read" setting on the folder.

enter image description here

and of course changing it back to allow "execute" hence get a folder contents listing:

sudo chmod o+x /man

results in the folder disappearing from theπ Tin volume aka root of the pi's boot volume you are looking at on your Mac desktop:

enter image description here

(note, you can add a file to the pi's storage root and it shows up fine so you know it is working... feature-error.jpg for example)

Cannot login as root to see the whole pi. Cannot see the root of the disk. Both intentional. Here is the code in Netatalk that keeps the 'root' user from logging in for example: auth.c file under GitHub see line 224

How many wasted hours have how many people put in discovering this artificial set of limitations?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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