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:
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 setfattr
and 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.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments