在過去的 24 小時裡,我用各種軟體包安裝了我的 Debian 伺服器。由於該伺服器在 Mac OS X (10.8) 環境中運行,我最初的目標是使用該伺服器作為 TimeCapsule 的替代品。
因此,我安裝了 Netatalk 3.0.2 和 avahi-daemon 以支援 ZeroConfig 和 Time Machine。
連接到我的伺服器的硬碟採用 GUID 分割區方案進行 HFS+ 格式化。
我確實為每台 Mac 設置了一個包含一個資料夾的捲作為 TimeCapsule 卷,並添加了兩個 unix 用戶供他們訪問這些驅動器和兩個附加驅動器作為數據驅動器。我透過以下方式更改了 TimeCapsule 驅動器/資料夾的所有權
chown -R userA:userA /media/usb/TimeCapsuleA
and
chown -R userB:userB /media/usb/TimeCapsuleB
我的 /etc/afp.conf 看起來像這樣
[Global]
hostname = TimeCapsule
log file = /var/log/netatalk.log
uam list = uams_guest.so, uams_dhx.so, uams_dhx2.so,
zeroconf = yes
save password = yes
mimic model = TimeCapsule6,106
log level = default:warn
log file = /var/log/netatalk.log
hosts allow = 192.168.178.0/24
[default_for_all_vol]
[TimeCapsuleA]
path = /media/usb/TimeCapsuleBackup/TimeCapsuleA/
time machine = yes
valid user = usera
invisible dots = yes
search db = yes
ea = auto
cnid scheme = dbd
[TimeCapsuleB]
path = /media/usb/TimeCapsuleBackup/TimeCapsuleB/
time machine = yes
valid user = userb
invisible dots = yes
search db = yes
ea = auto
[PogoPlug1]
path = /media/usb/PogoPlug1/
cnid scheme = dbd
ea = auto
mac charset = MAC_ROMAN
invisible dots = yes
search db = yes
valid user = userA userB
[OSX-Exchange]
path = /media/usb/OSX-Exchange/
cnid scheme = dbd
ea = auto
mac charset = MAC_ROMAN
invisible dots = yes
search db = yes
valid user = userA userB
我的安裝台
/etc/auto.misc on /media/usb type autofs (rw,relatime,fd=6,pgrp=1658,timeout=300,minproto=5,maxproto=5,indirect)
/dev/sdb2 on /media/usb/TimeCapsuleBackup type hfsplus (ro,nosuid,nodev,noexec,relatime,sync,umask=22,uid=0,gid=0,nls=utf8)
/dev/sdc2 on /media/usb/PogoPlug1 type hfsplus (ro,nosuid,nodev,noexec,relatime,sync,umask=22,uid=0,gid=0,nls=utf8)
/dev/sdd2 on /media/usb/OSX-Exchange type hfsplus (ro,nosuid,nodev,noexec,relatime,sync,umask=22,uid=0,gid=0,nls=utf8)
/media/usb/ 的權限
drwxrwxrwx 1 evils evils 20 Feb 27 01:24 OSX-Exchange
drwxrwxr-x 1 evils evils 18 Feb 27 01:19 PogoPlug1
drwxrwxr-x 1 root root 12 Feb 27 01:00 TimeCapsuleBackup
所有驅動器均透過 autofs 掛載。 UserA 和 UserB 都是群組 0 的成員,並且在嘗試透過終端機執行此操作時可以寫入所有磁碟機。
現在,當我嘗試以 UserA 身分存取 TimeCapsuleA 磁碟區時,我獲得了完全寫入存取權限,並且可以將該磁碟區用作 TimeMachine 備份磁碟區。但是,當我使用屬於群組 0 的相同使用者存取 OSX-Exchange 或 PogoPlug1 時,我沒有獲得任何寫入權限,這真的很奇怪,因為我可以透過終端使用同一使用者寫入同一張光碟。當我將所有權更改為該用戶時,我再次獲得寫入權限,但只有該特定用戶才能再次寫入,而同一 gid 或有效用戶參數中的其他用戶都無法寫入。
現在,由於我有多個用戶需要存取這些資料驅動器,因此我需要找到一種方法來寫入相同驅動器,而無需在每次寫入用戶更改時更改所有權。
啟動 netatalk 時,我的 netatalk 日誌檔案輸出以下內容:
Feb 27 00:59:08.422374 cnid_dbd[3314] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineFH" does not support Extended Attributes or read-only volume
Feb 27 00:59:08.423147 cnid_dbd[3314] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineNS" does not support Extended Attributes or read-only volume
Feb 27 00:59:08.423549 cnid_dbd[3314] {netatalk_conf.c:196} (W:AFPDaemon): volume "PogoPlug1" does not support Extended Attributes or read-only volume
Feb 27 00:59:08.423828 cnid_dbd[3314] {netatalk_conf.c:196} (W:AFPDaemon): volume "OSX-Exchange" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.658562 cnid_metad[3460] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineFH" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.659329 cnid_metad[3460] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineNS" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.659725 cnid_metad[3460] {netatalk_conf.c:196} (W:AFPDaemon): volume "PogoPlug1" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.660002 cnid_metad[3460] {netatalk_conf.c:196} (W:AFPDaemon): volume "OSX-Exchange" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.799875 afpd[3459] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineFH" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.800798 afpd[3459] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineNS" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.801209 afpd[3459] {netatalk_conf.c:196} (W:AFPDaemon): volume "PogoPlug1" does not support Extended Attributes or read-only volume
Feb 27 01:04:34.801534 afpd[3459] {netatalk_conf.c:196} (W:AFPDaemon): volume "OSX-Exchange" does not support Extended Attributes or read-only volume
Feb 27 01:04:53.508492 afpd[3464] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineFH" does not support Extended Attributes or read-only volume
Feb 27 01:04:53.508942 afpd[3464] {netatalk_conf.c:196} (W:AFPDaemon): volume "TimeMachineNS" does not support Extended Attributes or read-only volume
Feb 27 01:04:53.509239 afpd[3464] {netatalk_conf.c:196} (W:AFPDaemon): volume "PogoPlug1" does not support Extended Attributes or read-only volume
Feb 27 01:04:53.509531 afpd[3464] {netatalk_conf.c:196} (W:AFPDaemon): volume "OSX-Exchange" does not support Extended Attributes or read-only volume
即使所有權與登入使用者相符時我具有完全寫入權限。
以下是我嘗試透過 AFP 建立新資料夾時遇到的錯誤:
Feb 27 01:05:08.355873 afpd[3467] {ad_open.c:976} (E:Default): ad->ad_ops->ad_mkrf(ad_p) failed: Permission denied
任何幫助將不勝感激!
答案1
這可能與您所有的坐騎都是唯讀有關嗎?三卷都有羅掛載表中的屬性。使用讀寫(讀寫)選項/etc/fstab如果自動掛載,則建立文件,如下所示:
/dev/sXXX /media/usb/volume_name type hfsplus rw,nosuid,nodev,noexec,relatime,sync,umask=22,uid=0,gid=0,nls=utf8
或者,如果您手動安裝,請使用:
sudo mount /dev/XXX /media/usb/volume_name -t hfsplus -o rw,nosuid,nodev,noexec,relatime,sync,umask=22,uid=0,gid=0,nls=utf8
答案2
我一直在為類似的問題而苦苦掙扎,錯誤訊息完全相同:
cnid_metad[]: volume "MyVolume" does not support Extended Attributes or read-only volume
Netatalk 版本使用 3.1.8,但基本上任何 3.x 都會產生相同的訊息。
就我而言,我共享 reiserfs 檔案系統,不需要擴展屬性,這只是資料存取量。所以我想清除 Debian Linux 系統伺服器的 daemon.log 中的錯誤,因為它會破壞日誌。
解決方案是在所有設定中停用擴充屬性ea = none
,並使用appledouble = v2
.
將程式碼放入 Volume 部分:
[MyVolume]
...
appledouble = v2
ea = none
答案3
配置鍵是複數:valid users
。