Difference between revisions of "AFP"

From Amahi Wiki
Jump to: navigation, search
(Updating AFP to fedora 12 and adding advertising (avahi) service)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
{{NeedsUpdate}}
 +
 +
 
The Apple Filing Protocol (AFP) is a network protocol that offers file services for Mac OS X and original Mac OS.  
 
The Apple Filing Protocol (AFP) is a network protocol that offers file services for Mac OS X and original Mac OS.  
Avahi is an open source implementation of Bonjour or former Rendezvous wich advertises servers to MacosX
+
Avahi is an open source implementation of Bonjour or former Rendezvous wich advertises servers to MacOS X.
  
NOTE: THIS IS NOT MEANT FOR PEOPLE WHO DONT KNOW WHAT THEY ARE DOING
+
NOTE: THIS IS NOT MEANT FOR PEOPLE WHO DONT KNOW WHAT THEY ARE DOING.
  
 
== Installation of netatalk into Amahi ==
 
== Installation of netatalk into Amahi ==
Line 8: Line 11:
 
* Become root (sudo -s or su -)
 
* Become root (sudo -s or su -)
 
* yum -y install netatalk
 
* yum -y install netatalk
* edit afpd.conf <code>- -noddp -tcp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh</code>  
+
* edit /etc/atalk/afpd.conf
*edit netatalk.conf
+
<code>- -noddp -tcp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh</code>  
<code>
+
*edit /etc/atalk/netatalk.conf <code>
ATALKD_RUN=no
+
ATALKD_RUN=no<br>
PAPD_RUN=no
+
PAPD_RUN=no<br>
CNID_METAD_RUN=yes
+
CNID_METAD_RUN=yes<br>
AFPD_RUN=yes
+
AFPD_RUN=yes<br>
TIMELORD_RUN=no
+
TIMELORD_RUN=no<br>
A2BOOT_RUN=no
+
A2BOOT_RUN=no</code>  
</code>  
+
* Once the app is installed you can add the folders you wish to share over AFP by editing the /etc/atalk/AppleVolumes.default file:
* Once the app is installed you can add the folders you wish to share over AFP by editing the Applevolume.default
+
<code>~/ "$u" allow:UserName rwlist:UserName,@users cnidscheme:cdb</code>
 +
Change UserName to your username, this will share your homefolder over afp
 +
* chkconfig atalk on
 +
* service atalk start
  
<code>~/ "$u" allow:UserName rwlist:UserName,@users cnidscheme:cdb</code>
+
For recent versions of Amahi/Netatalk (Tested with Amahi 6/Netatalk 2.1.3-1/Fedora 14), the service name is changed to 'netatalk.' So the above becomes;
  
Change UserName to your username, this will share your homefolder over afp
+
* chkconfig netatalk on
 +
* service netatalk start
  
 
== Installation of avahi into Amahi ==
 
== Installation of avahi into Amahi ==
Line 28: Line 35:
 
* Become root (sudo -s or su -)
 
* Become root (sudo -s or su -)
 
* yum -y install avahi
 
* yum -y install avahi
*go to /etc/avahi/services/
+
* go to /etc/avahi/services/
*add the afpd.service
+
* add the afpd.service file:
 
+
<code><?xml version="1.0" standalone='no'?><!--*-nxml-*--><br>
<code><?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
<service-group><br>
<service-group>
+
<name replace-wildcards="yes">%h Xserve</name><br>
<name replace-wildcards="yes">%h Xserve</name>
+
<service><br>
<service>
+
<type>_afpovertcp._tcp</type><br>
<type>_afpovertcp._tcp</type>
+
<port>548</port><br>
<port>548</port>
+
</service><br>
</service>
+
<service><br>
<service>
+
<type>_device-info._tcp</type><br>
<type>_device-info._tcp</type>
+
<port>0</port><br>
<port>0</port>
+
<txt-record>model=Xserve</txt-record><br>
<txt-record>model=Xserve</txt-record>
+
</service><br>
</service>
 
 
</service-group></code>
 
</service-group></code>
  
Line 53: Line 59:
 
rfb.service for screensharing without chickenvnc
 
rfb.service for screensharing without chickenvnc
  
<code><?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+
<code><?xml version="1.0" standalone='no'?><!--*-nxml-*--><br>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br>
<service-group>
+
<service-group><br>
<name replace-wildcards="yes">%h</name>
+
<name replace-wildcards="yes">%h</name><br>
<service>
+
<service><br>
<type>_rfb._tcp</type>
+
<type>_rfb._tcp</type><br>
<port>5900</port>
+
<port>5900</port><br>
</service>
+
</service><br>
</service-group>
+
</service-group></code>
</code>
 
  
 
samba.service so the bsod icon is replaced with a nice screen icon and is on the same server as vnc/screensharing
 
samba.service so the bsod icon is replaced with a nice screen icon and is on the same server as vnc/screensharing
  
<code><?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+
<code><?xml version="1.0" standalone='no'?><!--*-nxml-*--><br>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br>
<service-group>
+
<service-group><br>
<name replace-wildcards="yes">%h</name>
+
<name replace-wildcards="yes">%h</name><br>
<service>
+
<service><br>
<type>_smb._tcp</type>
+
<type>_smb._tcp</type><br>
<port>139</port>
+
<port>139</port><br>
</service>
+
</service><br>
</service-group>
+
</service-group></code>
</code>
 
  
 
there is also a nfs.service but havent been able to get this to work on snow leopard
 
there is also a nfs.service but havent been able to get this to work on snow leopard
  
<code><?xml version="1.0" standalone='no'?>
+
<code><?xml version="1.0" standalone='no'?><br>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br>
<service-group>
+
<service-group><br>
<name replace-wildcards="yes">NFS Shares on %h</name> ## Display Name
+
<name replace-wildcards="yes">NFS Shares on %h</name><!-- Display Name --><br>
<service>
+
<service><br>
       <type>_nfs._tcp</type>
+
       <type>_nfs._tcp</type><br>
       <port>2049</port>
+
       <port>2049</port><br>
       <txt-record>path=/var/hda/files/music</txt-record> ## path to NFS mountpoint
+
       <txt-record>path=/var/hda/files/music</txt-record><!-- Path to NFS mountpoint --><br>
</service>
+
</service><br>
<service>
+
<service><br>
         <type>_nfs._tcp</type>
+
         <type>_nfs._tcp</type><br>
         <port>2049</port>
+
         <port>2049</port><br>
         <txt-record>path=/var/hda/files/movies</txt-record> ## path to NFS mountpoint
+
         <txt-record>path=/var/hda/files/movies</txt-record><!-- Path to NFS mountpoint --><br>
</service>
+
</service><br>
</service-group>
+
</service-group></code>
</code>
 
  
 
Thanks to this great [http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/#netatalk2 tutorial] for ubuntu !!  
 
Thanks to this great [http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/#netatalk2 tutorial] for ubuntu !!  
  
 +
*Add mdns at the end of this line in /etc/nsswitch.conf
 +
hosts: files dns mdns
  
 
*Starting and stopping AFP and Avahi :  
 
*Starting and stopping AFP and Avahi :  
Line 106: Line 111:
 
== TODO ==
 
== TODO ==
  
Integrate AFP and avahi with the Shares tab of the WebUI just as tightly as Samba is
+
Integrate AFP and avahi with the Shares tab of the WebUI just as tightly as Samba is.

Latest revision as of 22:36, 14 September 2015

Msgbox.update.png Update Needed
The contents of this page have become outdated or irrelevant. Please consider updating it.


The Apple Filing Protocol (AFP) is a network protocol that offers file services for Mac OS X and original Mac OS. Avahi is an open source implementation of Bonjour or former Rendezvous wich advertises servers to MacOS X.

NOTE: THIS IS NOT MEANT FOR PEOPLE WHO DONT KNOW WHAT THEY ARE DOING.

Installation of netatalk into Amahi

  • Open a terminal either on the desktop or SSH
  • Become root (sudo -s or su -)
  • yum -y install netatalk
  • edit /etc/atalk/afpd.conf

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

  • edit /etc/atalk/netatalk.conf

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

  • Once the app is installed you can add the folders you wish to share over AFP by editing the /etc/atalk/AppleVolumes.default file:

~/ "$u" allow:UserName rwlist:UserName,@users cnidscheme:cdb Change UserName to your username, this will share your homefolder over afp

  • chkconfig atalk on
  • service atalk start

For recent versions of Amahi/Netatalk (Tested with Amahi 6/Netatalk 2.1.3-1/Fedora 14), the service name is changed to 'netatalk.' So the above becomes;

  • chkconfig netatalk on
  • service netatalk start

Installation of avahi into Amahi

  • Open a terminal either on the desktop or SSH
  • Become root (sudo -s or su -)
  • yum -y install avahi
  • go to /etc/avahi/services/
  • add the afpd.service file:

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

%h Xserve can be changed to your server name (not the same as your samba server!) model=Xserve can be changed to get a different icon for your server to PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort

  • Additionally you can make avahi advertise other services on your mac

rfb.service for screensharing without chickenvnc

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_rfb._tcp</type>
<port>5900</port>
</service>
</service-group>

samba.service so the bsod icon is replaced with a nice screen icon and is on the same server as vnc/screensharing

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>139</port>
</service>
</service-group>

there is also a nfs.service but havent been able to get this to work on snow leopard

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">NFS Shares on %h</name>
<service>

      <type>_nfs._tcp</type>
<port>2049</port>
<txt-record>path=/var/hda/files/music</txt-record>

</service>
<service>

       <type>_nfs._tcp</type>
<port>2049</port>
<txt-record>path=/var/hda/files/movies</txt-record>

</service>
</service-group>

Thanks to this great tutorial for ubuntu !!

  • Add mdns at the end of this line in /etc/nsswitch.conf

hosts: files dns mdns

  • Starting and stopping AFP and Avahi :

service atalk (start stop restart) service avahi-daemon (start stop restart)


TODO

Integrate AFP and avahi with the Shares tab of the WebUI just as tightly as Samba is.