From f4a7309be8b9fc173cfbc0d7831331892b020887 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 19 Mar 2020 08:46:26 +0100 Subject: [PATCH] AFP deprecated --- plugins/dynamix/AFP.page | 80 ----- plugins/dynamix/DashStats.page | 56 +--- plugins/dynamix/DiskList.page | 3 +- plugins/dynamix/SecurityAFP.page | 364 ----------------------- plugins/dynamix/SecurityNFS.page | 1 - plugins/dynamix/ShareList.page | 3 +- plugins/dynamix/include/DiskList.php | 2 - plugins/dynamix/include/PageBuilder.php | 2 +- plugins/dynamix/include/ProtocolData.php | 1 - plugins/dynamix/include/ShareList.php | 2 - plugins/dynamix/styles/default-black.css | 1 - plugins/dynamix/styles/default-white.css | 1 - plugins/dynamix/template.php | 1 - 13 files changed, 5 insertions(+), 512 deletions(-) delete mode 100644 plugins/dynamix/AFP.page delete mode 100644 plugins/dynamix/SecurityAFP.page diff --git a/plugins/dynamix/AFP.page b/plugins/dynamix/AFP.page deleted file mode 100644 index ec3bac381..000000000 --- a/plugins/dynamix/AFP.page +++ /dev/null @@ -1,80 +0,0 @@ -Menu="NetworkServices:1" -Title="AFP" -Icon="icon-apple" -Tag="apple" ---- - -
_(Please note that AFP is **deprecated**, please use SMB instead)_.
- -
-_(Enable AFP)_: -: - -:help81 -> Select 'Yes' enable [AFP](/Help) protocol support. -> -> Note: changing this value with array Started may cause a brief interruption in network services. -:end - -_(Connected users)_: -: 0) $AFPUsers--; - echo $AFPUsers; - else: - echo ""._('not available').""; - endif;?> - -  -: -
- -:help82 -> ### Overview -> AFP for Unraid includes both `netatalk` to implement Apple Filing Protocol, and `avahi` -> to implement Zeroconf, aka, Bonjour. -> -> As with SMB and NFS, you may export both disk shares and user shares via AFP. There are some important -> limitations to be aware of however: -> -> * You must be very careful when enabling AFP export of a disk share when that disk is also enabled -> for user shares. This is because `netatalk` creates several system directories in the root of shares, -> and these directories will show up as user shares. To prevent this, you may exclude the disk(s) -> from the user share file system on the [Share Settings](/Settings/ShareSettings) page. -> -> * The netatalk documentation includes a strong warning to not use symlinks anywhere in a file system -> being exprted via AFP. -> -> AFP for Unraid supports Time Machine, and all three security modes. -> -> ### Bonjour -> When AFP is enabled, your server name, with a `-AFP` suffix, should automatically appear in the left-hand pane of -> Finder alongside an Xserve icon. Clicking this icon permits you to explore the server shares using AFP protocol. -> -> In addition, if SMB is enabled, your server name, without any suffix, should also appear. This provides -> access to shares using the SMB protocol. -> -> ### Other notes -> [Prevent .DS_Store file creation on network volumes](http://hints.macworld.com/article.php?story=2005070300463515) - from the article: -> -> To prevent the creation of these files, open the Terminal and type: -> -> defaults write com.apple.desktopservices DSDontWriteNetworkStores true -> -> It may be necessary to log out and back in, or even to restart the computer for the change to take effect -> (this is what the article states). -:end \ No newline at end of file diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page index 3cb4d30b1..7e9626d84 100644 --- a/plugins/dynamix/DashStats.page +++ b/plugins/dynamix/DashStats.page @@ -100,7 +100,7 @@ $wg_up = $wg_up ? explode(' ',$wg_up) : []; $up = count($wg_up); $down = max(count($conf)-$up,0); $fans = exec("sensors -uA 2>/dev/null|grep -c 'fan[0-9]_input'"); -$group = $var['shareSMBEnabled']=='yes' | $var['shareAFPEnabled']=='yes' | $var['shareNFSEnabled']=='yes'; +$group = $var['shareSMBEnabled']=='yes' | $var['shareNFSEnabled']=='yes'; $url = "/webGui/include/DashUpdate.php"; $names = []; @@ -393,9 +393,6 @@ foreach ($ports as $port) { - - - @@ -419,19 +416,6 @@ foreach ($shares as $name => $share) { if (!count($shares)) echo ""._('No shares present').""; ?> - - $share) { - $list = "".truncate($name,20).""; - if ($share['luksStatus']>0) $list = str_replace('blue-text','green-text',$list); - elseif ($share['useCache']=='only') $list = str_replace('blue-text','orange-text',$list); - $comment = truncate($share['comment'],40); - $security = export_settings($var['shareAFPEnabled'], $sec_afp[$name]); - echo "$list$comment$security-"; -} -if (!count($shares)) echo ""._('No shares present').""; -?> - $share) { @@ -492,38 +476,6 @@ foreach ($users as $user) { } ?> - -".truncate($name,20).""; - $desc = truncate($user['desc'],40); - if ($name=='root') { - $write = '-'; $read = '-'; - } else { - $write = 0; $read = 0; - foreach ($shares as $share) { - $access = $sec_afp[$share['name']]; - if ($access['export']=='-') continue; - switch ($access['security']) { - case 'public': - $write++; - break; - case 'secure': - if (in_array($name,explode(',',$access['writeList']))) $write++; else $read++; - break; - case 'private': - if (in_array($name,explode(',',$access['writeList']))) $write++; - if (in_array($name,explode(',',$access['readList']))) $read++; - break; - } - } - } - if ($user['passwd']!='yes') $list = str_replace('blue-text','orange-text',$list); - echo "$list$desc$write$read"; -} -?> - - - if (item==1 && user==null) $('.afp.user2').show(); else $('.afp.user2').hide(); - if (item==1 && share==null) $('.afp.share2').show(); else $('.afp.share2').hide(); - if (item==2 && user==null) $('.nfs.user3').show(); else $('.nfs.user3').hide(); if (item==2 && share==null) $('.nfs.share3').show(); else $('.nfs.share3').hide(); @@ -774,7 +722,7 @@ function update5() { } function update15() { - var tag = $('.smb').is(':visible') ? 'smb' : $('.afp').is(':visible') ? 'afp' : $('.nfs').is(':visible') ? 'nfs' : ''; + var tag = $('.smb').is(':visible') ? 'smb' : $('.nfs').is(':visible') ? 'nfs' : ''; $.post('',{cmd:'shares',com:tag,names:''},function(data) { $.each(data.split('\0'),function(k,v) {$('#share'+(k+1)).html(v);}); }); diff --git a/plugins/dynamix/DiskList.page b/plugins/dynamix/DiskList.page index 17d2584d1..778a6f010 100644 --- a/plugins/dynamix/DiskList.page +++ b/plugins/dynamix/DiskList.page @@ -34,7 +34,7 @@ $(function() { - +
_(Name)__(Comment)__(SMB)__(NFS)__(AFP)__(Type)__(Size)__(Free)__(View)_
_(Name)__(Comment)__(SMB)__(NFS)__(Type)__(Size)__(Free)__(View)_

@@ -56,6 +56,5 @@ $(function() { > **Special modes:** > + SMB security mode displayed in *italics* indicates exported hidden disk shares. -> + AFP security mode displayed in *italics* indicates exported time-machine disk shares. > + NFS does not have special modes for disk shares. :end diff --git a/plugins/dynamix/SecurityAFP.page b/plugins/dynamix/SecurityAFP.page deleted file mode 100644 index 410e84782..000000000 --- a/plugins/dynamix/SecurityAFP.page +++ /dev/null @@ -1,364 +0,0 @@ -Menu="Disk Share" -Title="AFP Security Settings" -Tag="apple" -Cond="(($var['shareAFPEnabled']!='no') && (isset($name)?array_key_exists($name,$sec_afp):0))" ---- - - -:help22 -> This section is used to configure the security settings for the share when accessed using AFP and -> appears only when AFP is enabled on the Network Services page. -> -> *Read settings from* is used to preset the AFP security settings of the current selected share with the settings of an existing share. -> -> Select the desired share name and press **Read** to copy the AFP security settings from the selected source. -> -> *Write settings to* is used to copy the AFP security settings of the current selected share to one or more other existing shares. -> -> Select the desired destinations and press **Write** to copy the AFP security settings to the selected shares. -:end - -
-_(Read settings from)_ - -
-
-_(Write settings to)_ - -
- -
- - -_(Share name)_: -: - -_(Export)_: -: - -:help23 -> The Export setting determines whether this share is exported via AFP (Yes or No) -> The Export setting also includes a third option (Yes - Time Machine). This setting enables various -> special options for Time Machine; in particular a "volume size limit". Note: Apple recommends not -> to use the volume for anything but Time Machine due to the way locks are used. -:end - -_(Time Machine volume size limit)_: -: MB - -:help24 -> This limits the reported volume size, preventing Time Machine from using the entire real disk space -> for backup. For example, setting this value to "1024" would limit the reported disk space to 1GB. -:end - -_(Volume dbpath)_: -: - -:help25 -> Sets where to store netatalk database information. A directory with same name as the share will be -> created here. -> -> Leave this field blank to have the database created in the root of the share. -:end - -_(Security)_: -: - -:help26 -> The Unraid AFP implementation supports Guest access and fully supports the three security -> modes: Public, Secure, and Private. -> In general, when you click on your server's icon in Finder, you will be asked to log in as Guest or to -> specify a set of login credentials (user name/password). In order to use Secure or Private security on -> a share, you must have a user already defined on the server with appropriate access rights. -> -> Note: netatalk does not permit the user name root to be used for log in purposes. -> -> **Public** When logged into the server as Guest, a macOS user can view and read/write all shares set as -> Public. Files created or modified in the share will be owned by user `nobody` of -> the `users` group.
-> macOS users logged in with a user name/password previously created on the server can also view -> and read/write all shares set as Public. In this case, files created or modified on the server will -> be owned by the logged in user. -> -> **Secure** When logged into the server as Guest, a macOS user can view and read (but not write) all -> shares set as Secure.
-> macOS users logged in with a user name/password previously created on the server can also view and -> read all shares set as Secure. If their access right is set to read/write for the share on the server, -> they may also write the share. -> -> **Private** When logged onto the server as Guest, no Private shares are visible or accessible to any -> macOS user.
-> macOS users logged in with a user name/password previously created on the server may read or -> read/write (or have no access) according their access right for the share on the server. -:end - -  -: -
- - -
_(AFP)_ _(User Access)_
_(Guests have **read-only** access)_.
- -:help27 -> *Read settings from* is used to preset the AFP User Access settings of the current selected share with the settings of an existing share. -> -> Select the desired share name and press **Read** to copy the AFP security settings from the selected source. -> -> *Write settings to* is used to copy the AFP User Access settings of the current share to one or more other existing shares. -> -> Select the desired destinations and press **Write** to copy the AFP User access settings to the selected shares. -:end - -
-_(Read settings from)_ - -
-
-_(Write settings to)_ - -
- -
- - - -  -: -
- - -
_(AFP)_ _(User Access)_
_(Guests have **no** access)_.
- -:help28 -> *Read settings from* is used to preset the AFP User Access settings of the current selected share with the settings of an existing share. -> -> Select the desired share name and press **Read** to copy the AFP security settings from the selected source. -> -> *Write settings to* is used to copy the AFP User Access settings of the current share to one or more other existing shares. -> -> Select the desired destinations and press **Write** to copy the AFP User access settings to the selected shares. -:end - -
-_(Read settings from)_ - -
-
-_(Write settings to)_ - -
- -
- - - -  -: -
- - - diff --git a/plugins/dynamix/SecurityNFS.page b/plugins/dynamix/SecurityNFS.page index db2c5ce16..d36543b5f 100644 --- a/plugins/dynamix/SecurityNFS.page +++ b/plugins/dynamix/SecurityNFS.page @@ -97,7 +97,6 @@ $(function() { $('#tab').bind({click:function(){initDropdownNFS(true);}}); diff --git a/plugins/dynamix/ShareList.page b/plugins/dynamix/ShareList.page index b27f55d2e..ababaea90 100644 --- a/plugins/dynamix/ShareList.page +++ b/plugins/dynamix/ShareList.page @@ -34,7 +34,7 @@ $(function() { - +
_(Name)__(Comment)__(SMB)__(NFS)__(AFP)__(Cache)__(Size)__(Free)__(View)_
_(Name)__(Comment)__(SMB)__(NFS)__(Cache)__(Size)__(Free)__(View)_

@@ -63,6 +63,5 @@ $(function() { > **Special modes:** > + SMB security mode displayed in *italics* indicates exported hidden user shares. -> + AFP security mode displayed in *italics* indicates exported time-machine user shares. > + NFS does not have special modes for user shares. :end diff --git a/plugins/dynamix/include/DiskList.php b/plugins/dynamix/include/DiskList.php index 438d8294e..a71ec3aff 100644 --- a/plugins/dynamix/include/DiskList.php +++ b/plugins/dynamix/include/DiskList.php @@ -23,7 +23,6 @@ $disks = parse_ini_file('state/disks.ini',true); $var = parse_ini_file('state/var.ini'); $sec = parse_ini_file('state/sec.ini',true); $sec_nfs = parse_ini_file('state/sec_nfs.ini',true); -$sec_afp = parse_ini_file('state/sec_afp.ini',true); $compute = $_GET['compute']; $path = $_GET['path']; $fill = $_GET['fill']; @@ -92,7 +91,6 @@ foreach ($disks as $name => $disk) { echo "{$disk['comment']}"; echo "".disk_share_settings($var['shareSMBEnabled'], $sec[$name]).""; echo "".disk_share_settings($var['shareNFSEnabled'], $sec_nfs[$name]).""; - echo "".disk_share_settings($var['shareAFPEnabled'], $sec_afp[$name]).""; $cmd="/webGui/scripts/disk_size"."&arg1=".urlencode($name)."&arg2=ssz2"; $type = $disk['rotational'] ? _('HDD') : _('SSD'); if (array_key_exists($name, $ssz2)) { diff --git a/plugins/dynamix/include/PageBuilder.php b/plugins/dynamix/include/PageBuilder.php index 2da232085..1384d33af 100644 --- a/plugins/dynamix/include/PageBuilder.php +++ b/plugins/dynamix/include/PageBuilder.php @@ -41,7 +41,7 @@ function build_pages($pattern) { } function find_pages($item) { - global $docroot,$site,$var,$disks,$devs,$users,$shares,$sec,$sec_nfs,$sec_afp,$name,$display; + global $docroot,$site,$var,$disks,$devs,$users,$shares,$sec,$sec_nfs,$name,$display; $pages = []; foreach ($site as $page) { if (empty($page['Menu'])) continue; diff --git a/plugins/dynamix/include/ProtocolData.php b/plugins/dynamix/include/ProtocolData.php index b3338711b..25041df72 100644 --- a/plugins/dynamix/include/ProtocolData.php +++ b/plugins/dynamix/include/ProtocolData.php @@ -13,7 +13,6 @@ $share) { echo "{$share['comment']}"; echo "".user_share_settings($var['shareSMBEnabled'], $sec[$name]).""; echo "".user_share_settings($var['shareNFSEnabled'], $sec_nfs[$name]).""; - echo "".user_share_settings($var['shareAFPEnabled'], $sec_afp[$name]).""; $cmd="/webGui/scripts/share_size"."&arg1=".urlencode($name)."&arg2=ssz1"; $cache = _(ucfirst($share['useCache'])); if (array_key_exists($name, $ssz1)) { diff --git a/plugins/dynamix/styles/default-black.css b/plugins/dynamix/styles/default-black.css index ca57c1d7b..399472e10 100644 --- a/plugins/dynamix/styles/default-black.css +++ b/plugins/dynamix/styles/default-black.css @@ -164,7 +164,6 @@ table.share_status.dashboard tbody.array_view tr:last-child>td{padding-bottom:20 table.share_status.dashboard tbody.cache_view tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tbody.extra_view tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tbody.smb tr:last-child>td{padding-bottom:20px} -table.share_status.dashboard tbody.afp tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tbody.nfs tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tr>td:first-child{width:3.5%} table.share_status.dashboard tr>td:last-child{width:3.5%} diff --git a/plugins/dynamix/styles/default-white.css b/plugins/dynamix/styles/default-white.css index f01e7ea6a..7edc42e1d 100644 --- a/plugins/dynamix/styles/default-white.css +++ b/plugins/dynamix/styles/default-white.css @@ -164,7 +164,6 @@ table.share_status.dashboard tbody.array_view tr:last-child>td{padding-bottom:20 table.share_status.dashboard tbody.cache_view tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tbody.extra_view tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tbody.smb tr:last-child>td{padding-bottom:20px} -table.share_status.dashboard tbody.afp tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tbody.nfs tr:last-child>td{padding-bottom:20px} table.share_status.dashboard tr>td:first-child{width:3.5%} table.share_status.dashboard tr>td:last-child{width:3.5%} diff --git a/plugins/dynamix/template.php b/plugins/dynamix/template.php index 8e4457441..48505ba5a 100644 --- a/plugins/dynamix/template.php +++ b/plugins/dynamix/template.php @@ -30,7 +30,6 @@ $disks = (array)parse_ini_file('state/disks.ini',true); $users = (array)parse_ini_file('state/users.ini',true); $shares = (array)parse_ini_file('state/shares.ini',true); $sec_nfs = (array)parse_ini_file('state/sec_nfs.ini',true); -$sec_afp = (array)parse_ini_file('state/sec_afp.ini',true); // Read network settings extract(parse_ini_file('state/network.ini',true));