Sunday, August 19, 2012

Make AFP on Centos

  1. You will need gcc and some packages/libs for building berk-db and netatalkd, like “patch” and “make”
    1. yum install openssl.x86_64 libssl-dev gcc automake autoconf GSSAPI libgssapi-devel libgssapi  libgssapi-devel krb5-devel pam-devel shadow-devel openssl-devel cracklib wge
  2. Download the latest berkeley-db 4.8 (5.0 and 5.1 did not work for me), compile and install
    1. wget
    2. tar xpf db-4.8.30.tar.gz
    3. cd db-4.8.30/build_unix/
    4. ../dist/configure
    5. make
    6. make install
  3. Download latest netatalkd, compile, install and copy config files to /etc/atalk
    AFP works fine with the default configuration files.
    1. wget "" 
    2. tar xpf netatalk-2.1.5.tar.bz2
    3. cd netatalk-2.1.5
    4. ./configure --enable-redhat --enable-pgp-uam --enable-krb4-uam --enable-krbV-uam --with-bdb=/usr/local/BerkeleyDB.4.8/
    5. make
    6. make install
    7. mkdir -p /etc/atalk/
    8. cp -a config/*.conf /etc/atalk/
    9. chkconfig netatalk on
    10. service netatalk start
  4. When you mount this filesystem on mac, all files and directory permissions will be reset to 755, which is really annoying, specially if you use git. Git will show all the file permission changes to 755 instead of 644 for files. So, to solve the problem edit the file /etc/atalk/AppleVolumes.default and update the last line on the file
    1. vi /etc/atalk/AppleVolumes.default
        # change from
          :DEFAULT: options:upriv,usedots
        # to
          :DEFAULT: options:upriv,usedots dperm:0755 fperm:0644


No comments:

Post a Comment