Can’t log into TimeMachine on OpenWrt router with AFP Netatalk

I've put OpenWrt on a router (TP-Link TL-WR902AC v3) hoping to set it up with AFP Netatalk and use it as a mobile backup.

I’ve carefully followed the AFP Netatalk instructions and everything looks right until I attempt to set the drive as my TimeMachine backup. I can select the drive and am then prompted for login credentials. However after a few seconds I get an error alert.

	Time Machine can’t connect to the backup disk.

	There was an error authenticating with the provided username or password.

Screen Shot 2021-04-24 at 9.56.31 am

The AFP log shows the following.

Apr 24 10:20:10.232125 cnid_metad[2554] {cnid_metad.c:509} (note:AFPDaemon): CNID Server listening on localhost:4700
Apr 24 10:20:10.274105 afpd[2553] {afp_config.c:174} (note:AFPDaemon): Netatalk AFP/TCP listening on interface br-lan with address
Apr 24 10:20:10.274920 afpd[2553] {afp_config.c:174} (note:AFPDaemon): Netatalk AFP/TCP listening on interface br-lan with address fdea:9d0f:bd16::1:548
Apr 24 10:20:10.275973 afpd[2553] {afp_config.c:174} (note:AFPDaemon): Netatalk AFP/TCP listening on interface br-lan with address fe80::da47:32ff:febf:a64e:548
Apr 24 10:21:18.928836 afpd[2594] {auth.c:235} (note:AFPDaemon): Login by pedro (AFP3.4)
Apr 24 10:21:18.943576 afpd[2594] {auth.c:804} (note:AFPDaemon): AFP logout by pedro
Apr 24 10:21:18.945730 afpd[2594] {dsi_stream.c:504} (error:DSI): dsi_stream_read: len:0, unexpected EOF
Apr 24 10:21:18.946191 afpd[2594] {afp_dsi.c:517} (note:AFPDaemon): afp_over_dsi: client logged out, terminating DSI session
Apr 24 10:21:18.946878 afpd[2594] {afp_dsi.c:108} (note:AFPDaemon): AFP statistics: 0.60 KB read, 0.44 KB written

It appears it’s accepting my login then immediately logging me out again.

I am using a MacBook Pro (Retina, 15-inch, Mid 2014) running macOS Big Sur (11.2.3).

UPDATE: It does work if I take the undesirable step of setting 777 permissions on the Backups folder.

Does it work consistently for you after changing permissions of the backup folder? I’m seeing the same issue and giving the backup folder 777 does work for one backup, but once that backup is completed it gets locked out again.

Mine is still doing that first backup.

1 Like

I am facing the same issue. Is there any solution to it?

I never found one, the permissions revert after every backup in my experience.

Mine has been working consistently with two routers now.

There are two differences between what I have & the instructions on the OpenWrt page. My Backups folder has 777 permissions instead of 775 & my Time Machine drive is formatted HFS+ while the OpenWrt page assumes Ext4. I couldn't make it work with Ext4. To use HFF+ you must disable journalling by running diskutil disableJournal /Volumes/TimeMachineVolumeName in Terminal right after formatting.

I have found that if the router isn't shut down properly the Time Machine drive will sometimes, but not always, mount as read only on the next boot. Connecting my Time Machine drive to a Mac & running First Aid of Disk Utility on it has fixed that every time. If there's a simpler or better way to fix that I'd love to know it. My ideal would be to fix the read only leaving the drive connected to the router.

1 Like

Maybe hfsfsck?

1 Like

Good thought, & one I should have had already. I'll check it out.

1 Like