Share Folder in Ubuntu 11.04 for Mac OSX Lion ... - rossi daniele

Document Sample
Share Folder in Ubuntu 11.04 for Mac OSX Lion ... - rossi daniele Powered By Docstoc
					Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27




 LangiT

 Sky and Dreams

                                  Go


          Home
          About

 Posts Comments

          Ideas
          Technology
          Ubuntu
          Tips
          Project
          Living
          Macbuntu
          Mac OSX Lion
          Apple
          Arduino

 ← Install LAMP in Ubuntu Natty Narwhal
 Windows 8 Developer Preview →


 Share Folder in Ubuntu 11.04 for Mac OSX Lion
 September 14, 2011 by Admin 79 Comments

 I just bought a MacMini with OSX Lion 10.7. I chose 2.3GHz Mac mini and added 8 GB RAM on it. I
 also bought the wireless keyboard and magic mouse. Everything works great with pretty easy setup. Then
 connect it to the network via wifi.




 Many people have problems with the Time Machine setup and connect to shared folder in other server.
 Some others gave up and down graded back to OSX 10.6 Leopard. I would also do the same is to connect
 a shared folder in my Ubuntu 11.04. Like many others I found this is not an easy way for me. I have tried
 Samba with no luck. Samba is no longer supported in OSX Lion. So I choose using Netatalk with little
 adjustment in OSX Lion to force it able to see legacy AFP.

 I read there are ways to solve this problem. One that work for me is using Netatalk and AFP file sharing.

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 1 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



 There are many guidance you can use. I follow instruction available in the Apple support site, OS X Lion:
 Connecting to legacy AFP services. For additional reference I also read How to set up AFP filesharing on
 Ubuntu.

 Please note that the shared folder setup in Ubuntu must be in ext4 format. Other format will not work due
 to only provide readonly to the drive when mounted. I also noted that I can only use IP address when
 connect to server, use server name doesn’t work.

 I’m still struggling to enable the Time Machine feature. For time being the Mac is able to see the
 TimeMachine drive setup in Ubuntu but when I run the backup it (still) says that the network backup disk
 does not support the required AFP features. Somebody suggest to use newest beta version of netatalk. I
 need to try it. I will add here when I found the solution.

 I found the right solution. Below is how I accomplished it.

 Setup Netatalk

 I have tried standard installation, but I found many problems to access it from Mac OSX Lion. I have not
 tried beta version as suggested in some articles, but I found Netatalk version 2.2.1 answers my problem.
 This version support NTFS format, so you don’t have to use ext4 format as in previous version. I have
 tested shared folders in NTFS and Ext4 format drive.

 First let’s go to your Ubuntu 11.04. I use 32-bit version of Ubuntu 11.04, but I think should also works on
 other version. If you already setup Netatalk like me, you need to remove it.

 $ sudo apt-get remove netatalk

 Download Netatalk 2.2.1 here. Then extract and build it in Ubuntu.

 $ tar xzf netatalk-2.2.1.tar.gz
 $ cd netatalk-2.2.1
 $ sudo apt-get build-dep netatalk

 We use default prefix /usr/local, in case you want to use Ubuntu package in the future then it won’t
 conflict with this version.

 $ ./configure --enable-debian

 Build and Install Netatalk

 $ make
 $ sudo make install

 Install the Avahi Daemon

 $ sudo apt-get install avahi-daemon

 Configure Netatalk.

 $ sudo nano /usr/local/etc/netatalk/afpd.conf

 Add the below code at the end of file line.

 - -tcp -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword


file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 2 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



 Setup a folder for Time Machine.

 mkdir /backup
 mkdir /backup/timemachine
 chown macuser /backup/timemachine

 You may change the folder name /backup/timemachine to your folder name, and macuser to your
 username that you already setup in Ubuntu.

 Then setup the shared folder for Mac. Open AppleVolumes.default file using your favorite editor (I use
 nano):

 $ sudo nano /usr/local/etc/netatalk/AppleVolumes.default

 Add the following code to the end of the file:

 /backup/timemachine TimeMachine allow:macuser cnidscheme:dbd options:usedots,upriv,tm

 Please note the tm options. This is a mandatory for Time Machine, otherwise Time Machine will give you
 error that the AFP version is not supported.

 I setup another shared folder so I can use it to store files that I will use in Ubuntu or Windows. First
 prepare a folder for sharing, give the ownership to macuser, then add it to the AppleVolumes.Default file.
 I created a folder called Files, add the line below to the end of the file:
 /backup/files Files allow:macuser cnidscheme:dbd options:usedots,upriv

 Note that I did not put tm option for shared folder.

 Setup Avahi

 $ sudo nano /etc/avahi/services/afpd.service

 Add the following code to the file:

 <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
 <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
 <service-group>
     <name replace-wildcards="yes">%h</name>
     <service>
         <type>_afpovertcp._tcp</type>
         <port>548</port>
     </service>
     <service>
         <type>_device-info._tcp</type>
         <port>0</port>
         <txt-record>model=MacPro</txt-record>
     </service>
 </service-group>

 Start the Netatalk and Avahi services:
 $ sudo service netatalk start
 $ sudo service avahi-daemon start

 Setup Mac OSX Lion

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 3 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



 Now the Time Machine and shared folders are ready to use. Let’s go to the Mac part. We have to enable
 AFP legacy support. Open terminal and run the code below:

 $ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

 Open Finder, then from the top bar menu click Go then select Connect to Server or press command-K.
 Enter the Ubuntu address in the Server Address with the following format:
 afp://macuser@192.168.1.10

 Change macuser to your username that you setup in Ubuntu, and change the IP address to your Ubuntu
 IP. If everything ok, you will see the folders under Shared on the left bar.

 Now the last part is testing it to make sure everything works as planned. Open the Time Machine
 Preference in System Preference, click Select Disk, the timemachine drive should be in the list, select it,
 then click Use Backup Disk button. You will be asked for password, enter the password, click Connect
 button. Then turn On the Time Machine. Wait until the Time Machine start the backup, or click the Time
 Machine icon in the top bar, then click Backup Now.




 As you see in the picture above, it took almost an hour for my first backup of about 1.7 GB. Not too bad. I
 use cable network instead of Wifi.

 Now let’s test the shared folder setup. Open Finder from your Mac. You should see your server under the
 Shared on the left bar menu. Click the server and you will see your shared folder that you setup. Copy any
 file from your Document folder to the shared folder. If you see no error message, then congratulation you
 have done it!


file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 4 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



 Credits

 This article is written based on various sources. All credits go to these articles:
 http://derekingrouville.ca/2011/ubuntu-time-machine-server-for-osx-lion/
 http://missingreadme.wordpress.com/2010/05/08/how-to-set-up-afp-filesharing-on-ubuntu/
 http://support.apple.com/kb/HT4700

 https://help.ubuntu.com/community/Fstab

 http://netatalk.sourceforge.net/
                                             About these ads




file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 5 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27




                                              Privacy                        Sponsored by MINI




                                              Privacy                        Sponsored by MINI




                                              Privacy                        Sponsored by MINI




file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 6 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27




                                              Privacy                        Sponsored by MINI




                                              Privacy                        Sponsored by MINI




                                              Privacy                        Sponsored by MINI




                                              Privacy                        Sponsored by MINI




file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 7 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27




                                              Privacy                        Sponsored by MINI




                                              Privacy                        Sponsored by MINI


      Like Be the first to like this.


 Filed under Ideas, Mac OSX Lion, Ubuntu Tagged with AFP, Mac OSX Lion, Netatalk, Time Machine,
 Ubuntu 11.04

 79 Responses to Share Folder in Ubuntu 11.04 for Mac OSX Lion
      1. Nate says:
         September 22, 2011 at 9:51 am

          I’m having the same problem with AFP features, please let me know if you manage to find a
          solution.

         Reply
      2. Ronald Cano Jr. says:
         September 24, 2011 at 9:37 am

          I am also having the same problem. Would like to know if the beta version does indeed fix it.
          Thanks.

         Reply
      3. Admin says:
         September 24, 2011 at 9:50 pm

          Hi Nate and Ronald, Thanks for visiting. I have found the solution and already updated in this

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 8 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          article as promised. I hope you find it useful. Enjoy!

          Reply

      4. Pingback: Setup Shared DVD in Ubuntu for Mac OSX Lion « LangiT

      5. David Ovad says:
         October 3, 2011 at 7:12 am

          So, xfs formatted drives won’t allow read/write? That is the pits because I’ve already formatted my
          drives as xfs.

          Reply
                   redkigs says:
                   October 3, 2011 at 12:07 pm

                   Hi David,

                   I have not tried xfs format. The trick is to give permission to user who would have access to
                   the disk. Ubuntu simply can’t do anything if the disk was not created by any of its sudoers. I
                   hope that help solve your problem.

              Reply
      6. David Ovad says:
         October 4, 2011 at 10:10 am

          First let me apologize for not thanking you for putting this tutorial up on your blog when I first
          commented the other day. This took a lot of research and thus work on your part, so THANK YOU!

          I followed this tutorial and it worked perfectly! I’ve missed having Apple’s Filing Protocol working
          on my Ubuntu 10.04 LTS-64-server since I installed Lion on my MacBook Pro as well as my wife’s
          iMac. As I type my MacBook Pro is doing it’s first Time Machine backup since August.

          For the record, the space on my server that I am using for Time Machine is formatted using the
          “xfs” file system and the Time Machine backup seems to be working very smoothly. I doubt that it
          will not complete successfully but if that turns out to be the case I’ll repost.

          Thank you again!

          Reply
                   Admin says:
                   October 4, 2011 at 2:11 pm

                   You are welcome David, and thanks to you too for your sharing. That’s the great thing from
                   this blog community and using open source. Please post result of your case, I hope it works
                   well.

              Reply
      7. David Ovad says:
         October 5, 2011 at 6:24 am

          OK, Let me say just how perfectly this tutorial worked out. My MacBook Pro Time Machine

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive    Pagina 9 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          backup is 196+ GB’s. It took about 14 hours to do the initial backup. About 2/3#s of the way into it I
          saw errors and thought that the backup had failed. Checking the toolbar I saw that I lost my WiFi
          connection (this is timely because my 2+ year old Time Capsule is starting to drop it’s 5 GHz
          connections periodically). Anyway, I restarted the backup and it picked up where it left off and
          completed successfully. Since the initial backup I have had 4 more successful Time Machine
          backups, so all is working perfectly.

          My MacBook Pro is running OS X Lion 10.7.1
          The Ubuntu computer is an Intel Atom D525 SuperMicro server board.
          The OS is Ubuntu 10.04.3-64 LTS
          The drives that are visible with Netatalk are using the xfs filesystem and one is also a logical
          volume.

          Reading and writing work flawlessly so again this tutorial is right on the mark!

         Reply
      8. Bryan Ray says:
         October 6, 2011 at 12:16 pm

          Thanks so much for the tutorial. Worked perfectly!

          Reply
                   redkigs says:
                   November 5, 2011 at 11:58 am

                   Bryan, thanks for your visit and sharing.

               Reply
      9. Nick says:
         October 7, 2011 at 5:13 pm

          Thanks a million for this excellent tutorial, it was very straightforward and worked like a charm! I
          tried several others before this, with no success – but this just worked!

          Only one possible confusion: the AppleVolumes.default file modification.

          I suggest that you add an explanation for the AppleVolumes.default file. It was tricky for a ubuntu
          newbie like myself to know that “allow:username” should be changed to my actual username, and
          not be left intact like a variable in the text. Earlier on, you see, you used “macuser” as the
          placeholder for the actual username. My suggestion is that you continue with that same convention
          and add an explanation afterwards just in case.

          So the text then should read something like:

          —->
          Add the following code to the end of the file:

          /backup/timemachine TimeMachine allow:macuser cnidscheme:dbd options:usedots,upriv,tm

          As earlier, replace “macuser” with your username and change “/backup/timemachine” if you picked
          another folder earlier. Please note the tm options. This is a mandatory for Time Machine, otherwise
          Time Machine will give you error that the AFP version is not supported.

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 10 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          <—-

          While I am at it, to make the tutorial extra easy for the newbie, you may add, before starting to edit
          files, something like: "Configure Netatalk. Modify the afpd.conf file using your favorite editor (I
          use nano throughout):"

          That will make the newbie realize that she will enter an editor on the following command. Since
          most of the tutorial just entails pasting lines in the terminal, it is helpful for the beginner to get
          hands-up when something else is happening.

          Again, thanks for a great tutorial!

          Reply
                   Admin says:
                   October 7, 2011 at 7:37 pm

                   Hi Nick,

                   Its good to hear it works for you.

                   You are right. I wrote it immediately when I found the solution. I know it will be useful. I
                   will revise few things to make it more clear for readers. Thanks for your input.

              Reply
    10. Nick says:
        October 7, 2011 at 7:45 pm

          Thank *you* for putting it out there! “Google is your friend” is true only because of heroic posts
          like this! Keep up the good work.

        Reply
    11. Cemento says:
        October 13, 2011 at 5:06 pm

          Hy guys, bad news from 10.7.2, it has broken the afp connectivity once again!

          Reply
                   David Ovad says:
                   October 13, 2011 at 9:39 pm

                   I’m running 10.7.2 and still working…

                   Reply
                            Nick says:
                            October 14, 2011 at 12:37 am

                            It is working for me on 10.7.2 as well.

                            Cemento says:
                            October 14, 2011 at 2:01 am

                            Yes guys, you’re right! I’ve reapplied all the steps above and the backup is finally

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 11 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



                            working again.

                            Admin says:
                            October 14, 2011 at 8:36 am

                            I’m glad to hear that it works on 10.7.2, can’t wait to try it this week end. Thanks for
                            your update.

                   Admin says:
                   October 15, 2011 at 1:05 am

                   I just upgraded to 10.7.2. It works well without any additional settings.

             Reply
    12. Redkigs says:
        October 15, 2011 at 11:22 am

          I have share my ntfs formated disk to OSX Lion. I added the following line to the /etc/fstab file:

          /dev/sdb1 /media/data ntfs-3g defaults 0 0

          See the file system type ntfs-3g for ntfs formated disk.

          Reply

    13. Pingback: Connect to AFP Server Automatically « LangiT

    14. kevin says:
        November 2, 2011 at 1:57 pm

          I am probably a little over my head with this. Anyway I got everything done and when I tried to
          connect my mac finder says “There are no shares or you are not allowed to access them on the
          server.”

          I assume this is because I am not specifiying the folders properly. How do I make the
          “TimeMachine” and “File” folders for the mac to access? (to make it clear, I have 2 hard drives,
          and I want to dedicate 1 whole drive for the mac).

          Thanks for helping a new guy!

          Reply
                   redkigs says:
                   November 5, 2011 at 11:56 am

                   If you have 2 hard disk, make sure both disks are mounted automatically. Usually Ubuntu
                   detect automatically when you added new hard disks. If not, you can check it in your
                   /etc/fstab file at your ubuntu PC.

                   Next step is setup the shared folder as described in the article. Don’t forget to give access
                   rights to the username that you will use in Mac. Read the setup folder part in this article.
                   Then define the folder in AppleVolumes.default file. Restart the service, or reboot your
                   Ubuntu PC and Mac.


file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 12 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



              Reply
    15. Martijn den Ouden says:
        November 2, 2011 at 9:17 pm

          Wow, it works. Thank you very much for this detailed walkthough!

          Reply
                   redkigs says:
                   November 5, 2011 at 11:57 am

                   Martijn, good to hear that it works. Thanks for visiting and sharing.

              Reply
    16. sdsellars says:
        November 11, 2011 at 9:33 am

          I just wanted to say this article worked great for me.

          After following several other articles, I would get as far as connecting to AFP Share, but always get
          stuck at the error about unsupported location.

          I am using Ubuntu 11.10 (32-bit) running in VMWare (1×2.4GHZ vCPU / 512MB Memory /
          500GB Storage)

          Cheers!

          Reply
                   redkigs says:
                   November 12, 2011 at 11:25 am

                   Hi, It’s also great to hear it works for you. And thanks for sharing your experience.

               Reply
    17. alltg says:
        November 12, 2011 at 3:14 pm

          Thank you so much for this! It has helped me immensely. I am just trying to share my home
          directory folder on my 11.04 ubuntu server edition with mac osx 10.7.2. I believe I’ve followed
          every step above to fruition (had some issues with missing dependencies along the way which I
          think I’ve fixed — I successfully have both netatalk and avahi-daemon services running — not sure
          if I need both just for file sharing) but anyway, I see my server in Finder, but cannot access it. I
          don’t see any folder names and when I click “Connect As” it says: There was a problem connecting
          to the server. The version of the server you are trying to connect to is not supported…

          I have tried many different things (including running samba) and can’t access my ubuntu folder on
          my mac. Any ideas?

          Reply
                   sdsellars says:
                   November 12, 2011 at 9:17 pm

                   alltg,

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 13 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



                   Have you tried connecting with avahi-daemon service disabled but netatalk running?
                   Can you confirm which Version of Netatalk you are running? Can you elaborate on missing
                   dependancies you encountered but believe you fixed?

                   You said that you tried connecting via Samba, what about NFS?

                   How is your shared volume in Ubuntu formatted? xfs?

                   Reply
                            tg says:
                            November 13, 2011 at 12:57 am

                            Thanks so much for the reply! It looks like I did not have netatalk installed correctly. I
                            re-installed and now it appears to be working… Need to do a few more tests. I’ll report
                            back — really appreciate the help,

    18. Jeremy Brooks says:
        November 15, 2011 at 5:33 am

          Thanks for the guide. I am able to do a backup to TM from Lion to Ubuntu 11.10. However, when I
          enter Time Machine, I do not see any files. The message “connecting” appears, then the Time
          Machine drive mounts on the desktop, but the flying-through-space interface never appears. Any
          ideas?

          Reply
                   redkigs says:
                   November 15, 2011 at 5:21 pm

                   Make sure you have completed your first backup. It will take longer time for your first
                   backup.

                   Reply
                   gregplantada says:
                   April 30, 2012 at 10:07 am

                   I am having the exact same problem. My first backup completed and so do all the incremental
                   backups. However, I cannot enter the Time machine just as Jeremy described. Anyone have a
                   suggestion?

              Reply
    19. sdsellars says:
        November 15, 2011 at 5:37 am

          Jeremy,

          When you see drive is mounted, can you browse the contents in Finder? Or can you manually
          connect to the TM share and browse? Do you see the Sparse Image created by TM?

        Reply
    20. Taras says:
        November 18, 2011 at 7:00 pm


file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 14 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          Thanks for your tutorial! But on my Ubuntu server 10.04 LTS i get error “Something wrong with
          the volume’s CNID DB, using temporary CNID DB instead.Check server messages for details.
          Switching to read-only mode.”


          Reply
                   Admin says:
                   November 20, 2011 at 11:25 am

                   Hi, check your shared folder in Ubuntu. Make sure the user you use has proper rights (chown
                   the folder to user solve this issue). Check also in AppleVolumes.default. Make sure shared
                   folder properly mapped and use right option.

                   Reply
                            Taras says:
                            November 25, 2011 at 6:29 am

                            Strangely.

                            500gb hdd drive ext4 mount to /media/timemachine/
                            i’m create a folder: mkdir /media/timemachine/TM
                            next step: chown tarya /media/timemachine/TM

                            root@Homeless:/media/timemachine# ls -l
                            drwxr-xr-x 2 tarya root 4096 Nov 25 01:07 TM (tarya – USER, root – GROUP)

                            next: (nano /usr/local/etc/netatalk/AppleVolumes.default)
                            /media/timemachine/TM TimeMachine allow:tarya cnidscheme:dbd
                            options:usedots,upriv,tm,
                            nano /etc/avahi/services/afpd.service etc…

                            next: start service Netatalk & avahi-daemon

                            In Lion connect to Folder: Command+K – afp://tarya@192.168.0.1 – open empty
                            window and error “Something wrong with the volume’s CNID DB, using temporary
                            CNID DB instead.Check server messages for details. Switching to read-only mode.”

                            Go back to Ubuntu

                            root@Homeless:/media/timemachine/TM# ls -l

                            drwxr-xr-x 3 root tarya 4096 Nov 25 01:15 Network Trash Folder
                            drwxr-xr-x 3 root tarya 4096 Nov 25 01:15 Temporary Items

                            ???? root tarya???!!! root – user, tarya – group?

                            mmmm…

                            Taras says:
                            December 7, 2011 at 9:31 am

                            Yes! I do it!!!

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 15 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



    21. starko says:
        November 19, 2011 at 11:22 pm

          Hi,
          I am using Ubuntu 11.10 and Mac Os x lion 10.7.2 and I think I followed all the steps but I can’t
          connect to my ubuntu from my mac. I got a message ” There was a problem connecting to the
          server..”. Is this tutorial only for Ubuntu 11.04? If so , I might need to reinstall ubuntu. Thanks,

          Reply
                   Admin says:
                   November 20, 2011 at 8:44 pm

                   I have not tried in Ubuntu 11.10 but I think should work fine. Make sure your
                   AppleVolumes.default line is correct. Check if you already use tm option for time machine.
                   From the message you described it looks there is problem in connection to your Ubuntu PC.
                   Check if you can ping Ubuntu PC from your Mac. If you think all settings are correct restart
                   both machine sometimes solve this issue.

              Reply
    22. Regis Chapman (@regischapman) says:
        November 21, 2011 at 9:04 am

          This process worked nicely for me, unlike two of the other processes I followed. Thanks!

        Reply
    23. John says:
        December 10, 2011 at 6:13 pm

          I’ve followed this to the letter and all I get is some internal error, as below.

          Media-server avahi-daemon[31319]: Invalid response packet from host 192.168.1.15.
          Dec 10 11:06:00 Media-server afpd[31464]:
          ===============================================================
          Dec 10 11:06:00 Media-server afpd[31464]: INTERNAL ERROR: Signal 11 in pid 31464 (2.2.1)
          Dec 10 11:06:00 Media-server afpd[31464]:
          ===============================================================
          Dec 10 11:06:00 Media-server afpd[31464]: BACKTRACE: 3 stack frames:
          Dec 10 11:06:00 Media-server afpd[31464]: #0 /usr/local/sbin/afpd(netatalk_panic+0×29)
          [0x8096c99]
          Dec 10 11:06:00 Media-server afpd[31464]: #1 /usr/local/sbin/afpd() [0x8096de1]
          Dec 10 11:06:00 Media-server afpd[31464]: #2 [0xb770c400]

        Reply
    24. Tony says:
        December 20, 2011 at 8:53 pm

          Just wanted to add my two cents here.

          First off – thanks. This really helped me to get my Ubuntu server configured as a usable Time
          Machine.

          Secondly – like a lot of others, I’d used many other guides but with Lion they didn’t work. I was

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 16 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          starting to wonder if 10.7.2 might have broken something again, but then I realised that I hadn’t
          removed the entries from the default netatalk entries, from other “solutions”.

          So…if you don’t seem to be getting anywhere and have tried other guides, I’d suggest going
          through the default netatalk folder (/etc/netatalk) and editing any of the relevant files to remove the
          entries.

          I also converted my file system from ext3 to ext4 but I’m not certain that was 100% necessary.

          Thanks gain.

          Tony.
          PS – to clarify, it certainly does work with 10.7.2

        Reply
    25. oldguy says:
        December 22, 2011 at 8:15 am

          Man am I struggling… It is still not working for me. background: i got this working perfectly on
          11.04 using netatalk 2.2b4 following a maze of sites but basically doing all you have said. I allowed
          11.11 update to run and everything broke. I followed through your article and am still stuck.

          i am not sure all the dependencies were installed when i followed your instructions to install
          netatalk 2.2.1, i did do the previous version uninstall first.

          i think avahi is working because i see my “Xserve” in my finder sidebar.

          my default volumes look like:
          ~/ “$u” allow:al cnidscheme:dbd options:usedots,upriv
          //media/sdd1/timemachine “$u TimeMachine” allow:al cnidscheme:dbd options:usedots,upriv,tm
          //media/sdd1/storage “$u Storage” allow:al cnidscheme:dbd options:usedots,upriv

          Before I could never get it to work without the full path, i tried some minor tweaks but still the
          same “server does not exist or is not available” error occurs when trying to connect from finder or
          connect to server as mentioned above, my static ip address is reserved properly.

          could trying to advertise with “$u TimeMachine” and “$u Storage” not be supported anymore? i am
          just beginning to believe something more serious is broken as nothing i’ve done here seems to help.

          previously i did not even have to set TM to show unsupported drives, netatalk worked so well and
          TM app was working too. I’m pretty sure all macs were on 10.7.2 by then as well.

          hmmm… fortunately this is not critical, just a test of sorts. I’d hate to have to do a clean install. I
          think next time LTS hits I’ll fix it and leave it alone. I hope I can fix it in the mean time. any ideas?

          Reply
                   Tony says:
                   December 22, 2011 at 3:35 pm

                   My biggest problem after installing Netatalk 2.2.1 was that I had old entries in the files in the
                   /etc folders as opposed to the /usr.


file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 17 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



                   Once I removed these, it all sprang into life using just the configuration above.

                   I might add though, that although I’m on 10.7.2, my Ubuntu is only 11.04 still.

                   Reply
                            oldguy says:
                            December 22, 2011 at 10:58 pm

                            I finally got netatalk 2.2b4 working perfectly on 11.04 but putting 11.10 update broke
                            it. I went through the config files and all appear to be fine, as outlined above. I tried
                            pulling 2.2b4 and installing 2.2.1 but it didn’t resolve anything. Thanks for the advice.

                            oldguy says:
                            December 23, 2011 at 12:39 am

                            I think I’ve narrowed down the issue to netatalk, behavior is the same whether the
                            service is started or stopped. It does not echo anything when I start or stop it, should it?

                            avahi service seems ok, when stopped my Xserve icon disappears from finder sidebar
                            and it reappears again when avahi is started.

                            I guess I need to go over my netatalk 2.2.1 install again but I am pretty new at this and i
                            can’t always tell if things were done in the right order or if they completed as expected.

                            I think when I put 2.2b4 in I found a .pkg and it went in ok, when I run make or make
                            install i get errors that i’m not sure how to resolve.

                            getting berkeley db and headers in is an example, i can find a lot of interface options
                            but i know it’s not an interface i need. i finally found [dev] headers to get past some
                            errors but getting that part right was hard for me to find info on, especially for 11.10. i
                            could not even figure out if 11.10 came with a berkeley db component already or not
                            and i struggle to find terminal commands to determine what versions of items are
                            installed. again just examples.

                            thanks in advance for any ideas!

    26. vebaev says:
        December 28, 2011 at 10:01 pm

          Hi,
          I’m trying for hours doing the guide but I got …”CNID DB instead.Check server messages for
          details. Switching to read-only mode”
          I got folders:
          drwxr-xr-x 3 timemachine root 4.0K Dec 28 13:22 timemachine
          with /backup/TimeMachine in it.

          I got this options also:
          /backup/TimeMachine TimeMachine allow:timemachine cnidscheme:dbd options:usedots,upriv,tm

        Reply
    27. Hutch says:
        December 30, 2011 at 5:21 am

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 18 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          I have been trying to get my MBP (Lion) to backup to an AFP (netatalk) share on my Ubuntu 11.11
          server. None of the instructions that I had found have worked at all… Until I found this post. Thank
          you.

          Here were my symptoms.

          After checking and double checking, installing, uninstalling and reinstalling I noticed ONE big
          difference between what I had been doing and what was shown here. The formatting of the drive.

          My Ubuntu server physical drive is not formatted as ext4. I thought, for giggles, I would take a
          spare 1TB drive and put it in a windows machine and boot with an Ubuntu Live CD.

          I booted to the live CD, formatted the 1TB drive as ext4 and mounted it. As soon as I created a user
          to own the share, time machine started working.

          This was a very helpful walk-thru. It’s folks that take the time to blog their solutions that make this
          fun for all.

          Thanks again,
          Hutch

          Reply
                   David Ovad says:
                   December 30, 2011 at 6:14 am

                   FYI, I followed this tutorial several months ago with the exception that I used xfs as the file
                   system and it’s been working perfectly as well…

                   Reply
                            Hutch says:
                            December 30, 2011 at 7:31 am

                            After my above post, I installed the drive in my Ubuntu 11.10 server, updated fstab and
                            could not get it working again. (arghhh). I followed the instructions at
                            http://support.apple.com/kb/HT4700 and it sprang to life. It seems that these
                            instructions, for my osx 10.7.2 this were required.

                            I also restarted the server (not sure that mattered).

    28. vebaev says:
        December 31, 2011 at 7:10 pm

          Hi,
          I have managed to start TM working with my shares, but wandering why when I have declared two
          volumes, when I connect I see only the first one “TimeMachine” and TM use it.
          The second I want to use with my work Mac but now I see only one volume?

          /backup/TimeMachine TimeMachine allow:timemachine cnidscheme:dbd options:usedots,upriv,tm
          volsizelimit:100000

          /backup/TimeMachineW TimeMachineWork allow:timemachine cnidscheme:dbd
          options:usedots,upriv,tm volsizelimit:100000

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 19 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                                 24/11/12 17:27



          # End of File

          Reply
                   vebaev says:
                   December 31, 2011 at 7:24 pm

                   PS.
                   and I have in user time machine home folder :

                   /home/timemachine/backup$ ls
                   drwxr-xr-x 2 timemachine root 4.0K 2011-12-28 13:22 TimeMachine
                   drwxr-xr-x 2 timemachine root 4.0K 2011-12-31 14:01 TimeMachineW

              Reply
    29. Carlos Vega says:
        January 13, 2012 at 3:06 am

          Please, I need your help.
          In first great tutorial, is great.
          I’ve done all you said and my Mac detects the shared folder but when TimeMachine tries to do the
          backup it fails. The error message is (I’ve translate from spanish): “The net backup disk is not
          compatible with the required AFP features”

          Details:
          My shared folder is a NTFS partition in a USB volume.
          My ubuntu is 10.04 and my Mac OS X is Lion.

          Reply
                   Carlos Vega says:
                   January 13, 2012 at 8:24 am

                   Hey! I’ve done it again from the beginning and now it works!                       thank you so much!

                   Reply
                            Admin says:
                            January 19, 2012 at 8:52 pm

                            Its great to hear that it finally works!

    30. Justin says:
        January 19, 2012 at 11:28 pm

          I had trouble getting this to work until I found another post that had a slightly different afpd.conf
          line:
          - -tcp -noddp -uamlist uams_dhx.so,uams_dhx2_passwd.so -nosavepassword

          After that, everything was great. I’m also using an xfs file system and had no issues. Using ubuntu
          11.10 and OS X 10.7.2

          Thanks for the great info!

          Reply

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive       Pagina 20 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



    31. oldguy says:
        January 19, 2012 at 11:51 pm

          I’m still struggling. I went through all my config files and I think they are ok, they worked great in
          11.04 with netatalk 2.2b4 but the 11.10 update broke it. I had great backups going, the TM app was
          fine. I had 2 shares setup and my TM share did not require me set it to show unsupported disks, it
          couldn’t get any better.

          Now I get a “server may not exist or is unavailable” error from finder sidebar, where it shows
          reliably, and connect by ip does the same. with no user login prompt.

          I believe I have a loused up netatalk install and I’m not sure how to properly remove it or get it
          installed. 2.2.1 gives the same error as 2.2.2. when i got pissed and just reinstalled 2.2b4 from the
          software center over the top of it all i get prompted for login but then get a “check server name and
          ip address and try again” error.

          How can I reliably clear out old versions of netatalk and cleanly install the new version?

          Reply
                   Admin says:
                   January 21, 2012 at 10:07 pm

                   The easiest way to remove the locally built/installed version is running “make uninstall” from
                   the source directory from which it was built, but I guess that is not available anymore.

                   You can get the current source, run “./configure” and then “make uninstall”. If the file
                   locations haven’t changed between the version you compiled and the current one it should
                   work.

              Reply
    32. Admin says:
        January 21, 2012 at 10:28 pm

          There is a new version of netatalk 2.2.2. I just upgraded and it works great and faster. If you like
          you can download it here.

          Reply

    33. Pingback: AFP and OSX Lion « Stm Labs Forums

    34. Simon says:
        February 5, 2012 at 2:35 am

          Can someone please explain the following step: “Download Netatalk 2.2.1 here. Then extract and
          build it in Ubuntu.”

          I have donwloaded netatalk.2.2.2.tar.gz (instead of 2.2.1) and it is sitting in my downloads folder.

          When I type tar xzf netatalk-2.2.2.tar.gz I get the following
          tar (child): netatalk-2.2.2.tar.gz: Cannot open: No such file or directory
          tar (child): Error is not recoverable: exiting Now
          tar: Child returned status 2

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 21 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          tar: Error is not recoverable: exiting now

          Reply
                   oldguy says:
                   February 5, 2012 at 3:29 am

                   sounds like you are not executing from the working directory. try typing cd(space)and drag
                   downloads folder in to terminal then hit return so you are executing from the downloads
                   folder, it should find the file then. i usually just double-click and select extract rather than
                   trying extract from the command line. seems to work ok in 11.04 and 11.10… alternatively
                   you could run “tar xsf (drag netatalk here)” for similar results. or I may not understand your
                   issue.

             Reply
    35. Simon says:
        February 8, 2012 at 7:49 am

          Just wanted to let you know that following this guide helped explain things and worked for me.

          http://greghesp.com/2011/12/setup-osx-lion-time-machine-share-ubuntu-11-10/

          Lion 10.7.3 and Ubuntu 11.10

          Reply
                   oldguy says:
                   February 16, 2012 at 12:20 am

                   that worked for me…finally! I even had it just keep all my config files as they were! Yeay!
                   TM volume appears in TM prefs WITHOUT setting anything to show unsupported volumes
                   on the clients. In other words a working, SUPPORTED TN volume! TYTYTYTY!

              Reply
    36. astir13 says:
        February 14, 2012 at 4:12 am

          I got a “The version of the server you are trying to connect to is not supported.” error from my new
          Macmini Lion machine (running netatalk 2.2.2 from source on my ubuntu 10.04 server). Found a
          possible solution here: http://beacon.wharton.upenn.edu/davekonopka/2011/07/connect-os-x-lion-
          time-machine-to-a-network-drive/ Trying it this minute, made a make clean, and following make
          install to get all in place again… will see if that works.

          Reply
                   oldguy says:
                   February 16, 2012 at 12:26 am

                   If you are getting that error using that recent version of netatalk you likely need to look at
                   your config files very closely. sounds like the -tm switch is missing from apple defaults
                   config file. As I mentioned just above I can connect with TM and I do not set the
                   “showunsupportedvolumes” on lion TM either, also running 10.7.3

                   Reply
                            oldguy says:

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 22 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



                            February 16, 2012 at 12:29 am

                            also sounds like it could be in your afpd.conf, did you add uams_dhx2_passwd.so? that
                            dhx2 makes a big difference and is not in the default config file. Hope that helps.

    37. benlea123 says:
        March 1, 2012 at 10:56 am

          I’ve followed multiple different tutorials and I’m still stuck. I retried your tutorial on a fresh Ubuntu
          11.10 installation, but I get an error in Time Machine saying:

          Time Machine can’t access the backup disk “TimeMachine”.
          The operation couldn’t be completed. (OSStatus error 2.)

          I can access the disk by connecting in the finder to exampleuser@192.168.0.5, it just doesn’t want
          to back up in Time Machine.
          I’m using the folder /backup/timemachine which is owned by the correct user and has permissions
          0750.

          I also tried removing the afpd.service file as suggested by a different tutorial. Apparently netatalk
          2.2.x sets this up automatically without using this file. avahi-daemon still needs to be running
          though. Removing this file has had no effect on accessing the disk directly in finder.

          OSX Lion 10.7.3
          Ubuntu 11.10

          Reply
                   oldguy says:
                   March 1, 2012 at 11:10 am

                   I don’t know if that is correct or if permissions 777 may work better. If TM can’t access it
                   sounds like the tm flag may not be set in AppleVolumes.default. I did not have to set
                   “TMShowUnsupportedNetworkVolumes” with config files set as outlined. Also do you have
                   the full path dialed in apple volumes.default? I had to setup with //server/disk/path to access
                   my shares in apple volumes.default.

                   Reply
                            benlea123 says:
                            March 1, 2012 at 11:27 am

                            tm flag is definitely set, and changing the permissions of the directory didn’t make a
                            difference. Full path is set.
                            I didn’t need to set “TMShowUnsupportedNetworkVolumes” either, it showed up
                            automatically as an available disk in Time Machine.

                            oldguy says:
                            March 1, 2012 at 11:38 am

                            is the TM directory empty? I also did not have to create a sparse bundle but TM does
                            put hidden files in that directory, maybe you should be sure the TM directory is empty
                            and try again. I had some garbage in mine after a few failed attempts. I also had some
                            uuid issues with 11.04 but netatalk 2.2.1 seems to take care of that now (i would think

file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 23 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



                            that 2.2.2 is fine too). i assume you went through config files carefully and added the
                            uams_dhx2_passwd.so where needed.

                            benlea123 says:
                            March 1, 2012 at 12:07 pm

                            TM directory is completely empty. I’ve added uams_dhx2_passwd.so to afpd.conf, is
                            there anywhere else I need to add it?
                            My afpd.conf line reads as this:
                            - -tcp -noddp -uamlist
                            uams_randnum.so,uams_dhx.so,uams_dhx2.so,uams_dhx2_password.so -
                            nosavepassword

                   oldguy says:
                   March 1, 2012 at 11:21 am

                   oh, that is with 11.10 and 10.7.3

                   Reply

    38. Pingback: Netatalk                                                     | Hyuk's Home

    39. Pingback: Upgrade Netatalk « LangiT

    40. michael says:
        April 13, 2012 at 12:54 am

          i usually don’t take the time, but in this case… i can not express how grateful i am for your tutorial.
          it took 2 sys admins (linux, ms) 2hours of trial and error till we finally stumbled across this post and
          found the missing link. 2.2.1

          I can also confirm that this is still the way to go with the current 10.8 dev prev. 2

          thanks a lot!

        Reply
    41. Redkigs says:
        July 11, 2012 at 9:28 pm

          Just to share with you that this tutorial still works well with Ubuntu 12.04 and latest netatalk 2.2.3.

          Only one additional change needed to avoid “server may not exist..”. I declare the ubuntu IP so the
          line at afpd.conf should look like:

          SERVER -tcp -ipaddr 192.168.1.10 (…the rest of the line is the same as in the tutorial)

          Reply



 Leave a Reply


file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 24 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27




 Recent Posts

          Painful Upgrade to Mountain Lion
          Macbuntu Precise Pangolin Wallpaper
          Upgrade Netatalk
          Share DVD drive in Ubuntu 11.04 for Diskless Mac using Open SSH and Macfusion
          Set Virtualbox machine to separate desktop space in OSX Lion

 Pages

          About

 Category Cloud



  Android Apple Arduino Camera Dreams                               Ideas Living Macbuntu Mac
 OSX Lion               Mac OSX Mountain Lion Mobile               Project Robot Science
  Technology Tips Ubuntu                                                        Virtualbox Windows

 Recent Comments

          Alfie on Set Virtualbox machine to separate desktop space in OSX Lion
          Admin on Painful Upgrade to Mountain Lion
          Admin on Painful Upgrade to Mountain Lion
          oldguy on Painful Upgrade to Mountain Lion
          Redkigs on Share Folder in Ubuntu 11.04 for Mac OSX Lion

  Online




 Blog Stats

          87,370 hits

 Technology

          Arduino
          Fritzing
          Gnome Look
file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 25 di 26
Share Folder in Ubuntu 11.04 for Mac OSX Lion « LangiT                                                             24/11/12 17:27



          Instructables
          News.com
          OSX Lion
          Ubuntu
          Wired.com

 Donation

 Buy me a cup of coffee or a glass of beer if you like this blog...




 Follow Blog via Email

 Enter your email address to follow this blog and receive notifications of new posts by email.

 Join 14 other followers



    Sign me up!


 Blog at WordPress.com.

 Theme: Enterprise by StudioPress.




file:///Users/dr/Downloads/Share%20Folder%20in%20Ubuntu%2011.04%20for%20Mac%20OSX%20Lion%20«%20LangiT.webarchive   Pagina 26 di 26

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:9
posted:1/21/2013
language:English
pages:26