Bobcares

How to Install AFP on Ubuntu?

by | Oct 20, 2022

Let us take a closer look at how to install AFP on ubuntu and the advantages that we can get from the installation in a few simple steps with the assistance of our Server Management support services at Bobcares.

How to install AFP (Apple Filing Protocol) server on Ubuntu:

install afp on ubuntu

In contrast to Samba and NFS, the AFP server on a Linux server enables faster file access. The presence of an AFP server in a network has two advantages:

a) Allow access to shared files from OS X workstations.

b) Have a server for TimeMachine backups.

It’s possible to set up a Linux AFP server using Netatalk. Version 3 allows us to keep Apple information and resource forks in the extended attributes of the filesystem.  This is the fundamental difference between versions 2 and 3.

So, with version 2, we will see numerous.AppleDouble folders when attempt to access a network share from OS X. Therefore, by following the instructions below, we may install the most recent version 3.1.6:

  • We have to install the git by typing in the following command line. This is the first step to install the AFP on ubuntu:

    sudo apt-get install git,

  • After that, we have to Clone the latest netatalk sources. This will allow us to have easy access to future updates:


    $ cd ~
    $ mkdir dev $
    cd dev
    clone netatalk sources from http://sourceforge.net/p/netatalk/code/
    $ git clone git://git.code.sf.net/p/netatalk/code netatalk
    $ cd netatalk
    $ git checkout netatalk-3-1-6

  • After that, we have to follow:

    $ sudo apt-get install autoconf \
    libtool \
    automake \
    build-essential \
    libssl-dev \
    libgcrypt11-dev \
    libkrb5-dev \
    libpam0g-dev \
    libwrap0-dev \
    libdb-dev \
    libmysqlclient-dev \
    libavahi-client-dev \
    libacl1-dev \
    libldap2-dev \
    libcrack2-dev \
    systemtap-sdt-dev \
    libdbus-1-dev \
    ibdbus-glib-1-dev \
    libglib2.0-dev \
    tracker \
    ibtracker-sparql-0.16-dev \
    libtracker-miner-0.16-dev
    $ ./bootstrap
    $ ./configure \
    --with-init-style=debian-sysv \
    --without-libevent \ --without-tdb \
    --with-cracklib \ --enable-krbV-uam \
    --with-pam-confdir=/etc/pam.d \
    --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
    --with-tracker-pkgconfig-version=0.16
    $ make
    $ sudo make install

  • After typing in the command we have to verify that it works. Confirm this to proceed with the install of AFP on ubuntu. And this command will let us have access to the location of the configuration files.

    $ afpd -V 

We must confirm the system supports the features that went under expansion. Since ext4 is enabled by default on Ubuntu 14.04, there is probably nothing we need to do. However, we can use setfattrand getfattr to confirm that we can set and read user extended attributes.

Modify settings

We have the option to modify settings to install AFP on ubuntu. To do this type in the following command line:

$ sudo vim /usr/local/etc/afp.conf

In this case, we have the next settings. Give user1 writing rights to the user1 folder and read-only permissions to user2:

[user1]
path = /home/user1
rolist = user2 #
user2 [user2]
path = /home/user2
rolist = user1
Share TimeMachine folder, limit it to ~1TB, and
give access only to user1 and user2 [TimeMachine]
path = /mnt/BACKUP/TimeMachine
time machine = yes
vol size limit = 1000000
valid users = user1 user2

General method

We can use a more general way of sharing home folders by typing in the following command line:

[Homes]
basedir regex = /home

However, to have more share control provide user1 read only access to all shares, including those belonging to user2. Additionally, while visiting this server, we can view directories for both users.

And also we can use the system accounts with their home folders. We don’t want to share these, so it was easy to set up everything standard.

It is important to note that we must ensure that all users can access the TimeMachine folder. In this example, the specified users were given ownership of the TimeMachine folder. The group was given permission to do anything in the folder, and both users were joined to the group:

# Change ownership of TimeMachine folder to users group $ sudo chown -R root:users /mnt/BACKUP/TimeMachine
# Add read-write access to the users group
$ sudo chmod -R g+rwx /mnt/BACKUP/TimeMachine
# Add user1 and user2 to users group
$ sudo usermod -a -G users user1
$ sudo usermod -a -G users user2 

Finally, we have to reboot the netatalk for the new setups to settle in:

$ sudo service avahi-daemon start
$ sudo service netatalk start

After that, this server ought to be visible in Finder under the Shared category. We ought to be able to recognize this server as a TimeMachine server as well.

[Need assistance with similar queries? We are here to help]

Conclusion

To sum up we have now learned how to install AFP on ubuntu. We have gone through all of the setup steps in the process. And we have also seen the advantages of the installation with the support of our Server Management Support Services at Bobcares.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF