Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
I am trying to mount a volume from our Synology NAS APFS volume on our MacBook Pro 2021 (M1 model). I'd like to ensure the volume remains mounted even when the user is switching between networks (e.g. working from home, then coming into the office without shutdown).

The NAS is on the same network as the Mac, so I can use finder to mount the volume, authenticate successfully and add it as a "Open at login" item which maps the volume successfully at login, but this does not remain mapped if the user changes networks or locations.

I am using a 3rd party app called "Volume Manager" which I downloaded from the App Store which is designed to keep the volume mounted every x hours, and when I put those same credentials into the app, it says the volume is mounted successfully, but I don't see the volume appear under "/volumes" directory or in Finder. If I manually use finder to mount the volume, I see the volume appear in "/volumes" folder.

I've used various scripts from chatgpt and it seems like I cannot successfully map this volume other than using finder or the "Open at login" option.

Does anybody have any ideas how I can proceed? I'm fairly new to mounting volumes on MacOS from other locations, but I'm certain it's an issue with the /volumes folder not generating the Volume when I use the 3rd party app or scripts. Thanks in advance!
 

arw

macrumors 65816
Aug 31, 2010
1,236
979
There is a similar thread where "Automounter" is recommended:

If you want to try a built-in solution, this is the template I use. It assumes you have saved your credentials into macOS' keychain.
First time setting it up, I recommend the shorter debug version that does not suppress error messages.
I did suppress them though so that in cases where you do not have a network connection or the server is down, you are not bugged by error popups.
You can save it as a text file with the extension .sh and make it executable with chmod +x MountNetworkShare.sh.
You can use it as login item and/or create a launch daemon to execute it regularly.
Or you can drag the file into the Finder to click it manually to connect your shares.
Finder.Scripts.png


The command it uses is:
Bash:
osascript -e "mount volume \"smb://TheUserName@TheIP/TheNetworkShare\""
Just customize the first three variables according to your environment.
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountAFP(){
    Adress="afp://$User@$Server/$Share"
    osascript -e "mount volume \"'$Adress'\""
}
MountAFP
And with suppressed error messages:
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountAFP(){
    Adress="afp://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}
DismissPopup(){
    osascript -  <<'EOF'
        try
            tell application "System Events"
                click UI element "OK" of window 1 of application process "NetAuthAgent"
            end tell
        end try
EOF
}
MountAFP
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountSMB(){
    Adress="smb://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}
DismissPopup(){
    osascript -  <<'EOF'
        try
            tell application "System Events"
                click UI element "OK" of window 1 of application process "NetAuthAgent"
            end tell
        end try
EOF
}
MountSMB
 
Last edited:

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
Thank you! I'll give this a go.
There is a similar thread where "Automounter" is recommended:

If you want to try a built-in solution, this is the template I use. It assumes you have saved your credentials into macOS' keychain.
You can save it as a text file with the extension .sh and make it executable with chmod +x MountNetworkShare.sh.
You can use it as login item and/or create a launch daemon to execute it regularly.
Or you can drag the file into the Finder to click it manually to connect your shares.
View attachment 2393544

The command it uses is:
Bash:
osascript -e "mount volume \"smb://TheUserName@TheIP/TheNetworkShare\""
Just customize the first three variables according to your environment.
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountAFP(){
    Adress="afp://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}
MountAFP
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountSMB(){
    Adress="smb://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}
MountSMB
Thank you! I'll give this a go.
 

ChrisA

macrumors G5
Jan 5, 2006
12,917
2,169
Redondo Beach, California
I am trying to mount a volume from our Synology NAS APFS volume on our MacBook Pro 2021 (M1 model). I'd like to ensure the volume remains mounted even when the user is switching between networks (e.g. working from home, then coming into the office without shutdown).

Does anybody have any ideas how I can proceed? I'm fairly new to mounting volumes on MacOS from other locations, but I'm certain it's an issue with the /volumes folder not generating the Volume when I use the 3rd party app or scripts. Thanks in advance!

I have Synology. NFS works OK but you will find that SMB actually works better. I never have the pproblem of the mounts "going away" I use NFS on Linux clients.
 

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
I have Synology. NFS works OK but you will find that SMB actually works better. I never have the pproblem of the mounts "going away" I use NFS on Linux clients.
Thanks for the info. The user has saved many files and folders with illegal characters in them (e.g. ? * ) so we are using AFP protocol and APFS volume on the NAS to ensure the files/folders are readable when they copy. Using SMB won't allow us to successfully copy the files across.

Volume Mounter App is now working as intended, however when I copy files to the volume it mounts, it replaces the illegal characters with squares instead of the actual characters when viewed on the NAS.
1719889015885.png


If i copy these files from my Mac using the volume mounted directly with MacOS, i don't see this issue.

I'm going to try the script ARW suggested and create a launch daemon to execute it every hour or so, to see if this can achieve the goal using AFP.
 

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
There is a similar thread where "Automounter" is recommended:

If you want to try a built-in solution, this is the template I use. It assumes you have saved your credentials into macOS' keychain.
You can save it as a text file with the extension .sh and make it executable with chmod +x MountNetworkShare.sh.
You can use it as login item and/or create a launch daemon to execute it regularly.
Or you can drag the file into the Finder to click it manually to connect your shares.
View attachment 2393544

The command it uses is:
Bash:
osascript -e "mount volume \"smb://TheUserName@TheIP/TheNetworkShare\""
Just customize the first three variables according to your environment.
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountAFP(){
    Adress="afp://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}
MountAFP
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

MountSMB(){
    Adress="smb://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}
MountSMB
Thanks for the script ARW. I had saved the credentials in Keychain on the mac user profile, made the script executable with a .sh extension. I ran the script but received the following message. It didn't map the volume for me.
1719895906532.png
 

arw

macrumors 65816
Aug 31, 2010
1,236
979
Sorry, I did not post the complete code and edited it accordingly.
To not disturb the user in scenarios without a network connection or an offline server, the command DismissPopup automatically clicks the OK button of the popup that appears if a connection attempt fails.
You can remove or uncomment the command if you want to see said error popup.
 
Last edited:
  • Like
Reactions: Roberto79

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
Sorry, I did not post the complete code and edited it accordingly.
To not disturb the user in scenarios without network connection, the code automatically clicks the popup window's Ok button.
You can remove the command to see the message.
Thanks. The script runs now but did not mount the volume.
Just curious if there's any special criteria for having the password stored in keychain? I've put the NAS server name as the website, and the username/password.
1719897976094.png
 

arw

macrumors 65816
Aug 31, 2010
1,236
979
If you set the timeout to a higher value like 60 seconds
Bash:
my_time="60" # timeout in seconds
and uncomment
Bash:
#DismissPopup
do you get any popups to enter the password?
If so, do enter it and make sure to tick "Add to keychain".
You said you can connect via Finder. To confirm the correct values for the script, does it also work via Finder by clicking "Go > Connect to server" and enter the address like:
afp://TheUserName@TheServer/TheNetworkShare
 
Last edited:

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
If you set the timeout to a higher value like 60 seconds
Bash:
my_time="60" # timeout in seconds
and uncomment
Bash:
#DismissPopup
do you get any popups to enter the password?
If so, do enter it and make sure to tick "Add to keychain".
Can you manually connect to the server via Finder by clicking “Go > Connect to server"
and enter the address like:
afp://TheUserName@TheServer/TheNetworkShare
That worked! (it was the timeout that needed to be extended).

My next step is to ensure the script runs every hour or so to ensure that if the user moves location from home to office, the volume remains mounted. It is set to run on startup under "Login Items" which will mount the volume successfully on login, but if the user puts her Mac to sleep and commutes to the office without shutting down, the volume won't be mounted until she logs off and back on.

Do you have any tips on how to have the script execute every hour or so? You mentioned a launch daemon?
Thanks again for your help.
 

Slartibart

macrumors 68040
Aug 19, 2020
3,142
2,817
Depending what „office“ means in the described scenario of wanting a persistent home NAS mount independent of location - you would have to mount the NAS through an IP which is visible outside your home LAN (including when at home).

One option for this is to access (and mount) the NAS through Synology‘s QuickConnect (basically a DynDNS service included with the NAS) -> QuickConnect.to/NameOfYourNAS (or via your own domain and dynDNS of your choice).

Depending on for what you use your NAS for, this can quite a bit reduce access/transfer speeds when at home.

Obviously you can run location based scripts, here is a reddit thread with an example. That would allow to connect at home within the same (W)LAN and from everywhere else via a dynDNS.



It might actually be much easier and convenient to use Synology "Drive". Think of it as a replacement OneDrive, Google Drive, Dropbox &Co., with the advantage that you are using your NAS as storage.

Or to use Synology’s Cloud Sync which allows to sync a lot of 3rd party clouds to the NAS directly… and you would then mount the 3rd party cloud persistantly.


nota bene: I do correctly understand, you do want the NAS persistent mounted independent of the geographic location (as in a different LAN/different IP domain) , don’t you? And “no manual unmount/remount”, right? 🤓
 
Last edited:

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
Depending what „office“ means in the described scenario of wanting a persistent home NAS mount independent of location - you would have to mount the NAS through an IP which is visible outside your home LAN (including when at home).

One option for this is to access (and mount) the NAS through Synology‘s QuickConnect (basically a DynDNS service included with the NAS) -> QuickConnect.to/NameOfYourNAS (or via your own domain and dynDNS of your choice).

Depending on for what you use your NAS for, this can quite a bit reduce access/transfer speeds when at home.

Obviously you can run location based scripts, here is a reddit thread with an example. That would allow to connect at home within the same (W)LAN and from everywhere else via a dynDNS.



It might actually be much easier and convenient to use Synology "Drive". Think of it as a replacement OneDrive, Google Drive, Dropbox &Co., with the advantage that you are using your NAS as storage.

Or to use Synology’s Cloud Sync which allows to sync a lot of 3rd party clouds to the NAS directly… and you would then mount the 3rd party cloud persistantly.


nota bene: I do correctly understand, you do want the NAS persistent mounted independent of the geographic location (as in a different LAN/different IP domain) , don’t you? And “no manual unmount/remount”, right? 🤓
Sorry I wasn't clear, and thanks for your detailed suggestion.

The user will only be able to access the NAS from the Office, not from home (this is considered fine for the purpose of this task).

I'd like to ensure that the volume to NAS is mounted persistently from the office. If the user works from home, puts their laptop to sleep, comes to office and docks via LAN, the volume won't be mounted as it's only set to mount upon login.

I would like to schedule the script ARW provided so that it runs every hour (or so) to ensure the volume gets mounted while she's in the office.
 

arw

macrumors 65816
Aug 31, 2010
1,236
979
I would like to schedule the script ARW provided so that it runs every hour (or so) to ensure the volume gets mounted while she's in the office.
EDIT: At home, if the server cannot be reached, you'd get an error popup every time the script is executed.
I therefore added a condition in the script to only be executed if the server can be pinged successfully.

Given your use case, I'd set the repetition time to something significantly shorter than one hour but instead add a second condition in the script that it only tries to mount the network share if it isn't already mounted.

See the last few lines of the updated script at the bottom of this post.

Now to the launch agent:
Name the following code to something like "com.arw.ExecuteInInterval.plist" and put it in the following directory if you want to use it for all users of said Mac:
/Library/LaunchAgents/com.arw.ExecuteInInterval.plist
If you only want it for one user, put it here:
/Users/USERNAME/Library/LaunchAgents/com.arw.ExecuteInInterval.plist
XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.arw.ExecuteInInterval</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/Shared/Scripts/MountNetworkShare.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>60</integer>
</dict>
</plist>
If you go this route, you don't need the "Open at login" option anymore.
The following part takes care of that:
RunAtLoad > true

Adjust the path to your script file:
<string>/Users/Shared/Scripts/MountNetworkShare.sh</string>
Adjust the time in seconds:
StartInterval > 60 means the referenced script is executed every minute.

Set the correct permissions of the file by executing:
Bash:
sudo chown root:wheel /Library/LaunchAgents/com.arw.ExecuteInInterval.plist
sudo chmod 644 /Library/LaunchAgents/com.arw.ExecuteInInterval.plist

And the updated script:
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

# This subroutine checks three times if the server can be pinged
GetNetworkStatus () {
mycounter=0
ServerConnected=false
while [[ $ServerConnected == false ]] && [[ $mycounter -lt 3 ]]
do
    mycounter=$(( mycounter + 1 ))
    ServerResult=$(ping -c 2 $Server)
    if [[ $ServerResult == *", 0.0% packet loss"* ]]; then
        # echo $Server " can be reached"
        ServerConnected=true
    else
        # echo $Server " CANNOT be reached"
        ServerConnected=false
        sleep 1
    fi
done
}

# This subroutine is responsible for mounting the volume
MountAFP(){
    Adress="afp://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}

# This subroutine automatically clicks the "OK" button if an error window pops up
DismissPopup(){
    osascript -  <<'EOF'
        try
            tell application "System Events"
                click UI element "OK" of window 1 of application process "NetAuthAgent"
            end tell
        end try
EOF
}

GetNetworkStatus
# only execute if Server can be reached
if [ $ServerConnected = true ]; then
    # only execute if network share is not already mounted
    if [ ! -d /Volumes/$Share ]; then
        MountAFP
    fi
fi
If you create the script from scratch, remember to make the file executable with:
chmod +x MountNetworkShare.sh
 
Last edited:

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
EDIT: At home, if the server cannot be reached, you'd get an error popup every time the script is executed.
I therefore added a condition in the script to only be executed if the server can be pinged successfully.

Given your use case, I'd set the repetition time to something significantly shorter than one hour but instead add a second condition in the script that it only tries to mount the network share if it isn't already mounted.

See the last few lines of the updated script at the bottom of this post.

Now to the launch agent:
Name the following code to something like "com.arw.ExecuteInInterval.plist" and put it in the following directory if you want to use it for all users of said Mac:
/Library/LaunchAgents/com.arw.ExecuteInInterval.plist
If you only want it for one user, put it here:
/Users/USERNAME/Library/LaunchAgents/com.arw.ExecuteInInterval.plist
XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.arw.ExecuteInInterval</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/Shared/Scripts/MountNetworkShare.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>60</integer>
</dict>
</plist>
If you go this route, you don't need the "Open at login" option anymore.
The following part takes care of that:
RunAtLoad > true

Adjust the path to your script file:
<string>/Users/Shared/Scripts/MountNetworkShare.sh</string>
Adjust the time in seconds:
StartInterval > 60 means the referenced script is executed every minute.

Set the correct permissions of the file by executing:
Bash:
sudo chown root:wheel /Library/LaunchAgents/com.arw.ExecuteInInterval.plist
sudo chmod 644 /Library/LaunchAgents/com.arw.ExecuteInInterval.plist

And the updated script:
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

# This subroutine checks three times if the server can be pinged
GetNetworkStatus () {
mycounter=0
ServerConnected=false
while [[ $ServerConnected == false ]] && [[ $mycounter -lt 3 ]]
do
    mycounter=$(( mycounter + 1 ))
    ServerResult=$(ping -c 2 $Server)
    if [[ $ServerResult == *", 0.0% packet loss"* ]]; then
        # echo $Server " can be reached"
        ServerConnected=true
    else
        # echo $Server " CANNOT be reached"
        ServerConnected=false
        sleep 1
    fi
done
}

# This subroutine is responsible for mounting the volume
MountAFP(){
    Adress="afp://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}

# This subroutine automatically clicks the "OK" button if an error window pops up
DismissPopup(){
    osascript -  <<'EOF'
        try
            tell application "System Events"
                click UI element "OK" of window 1 of application process "NetAuthAgent"
            end tell
        end try
EOF
}

GetNetworkStatus
# only execute if Server can be reached
if [ $ServerConnected = true ]; then
    # only execute if network share is not already mounted
    if [ ! -d /Volumes/$Share ]; then
        MountAFP
    fi
fi
If you create the script from scratch, remember to make the file executable with:
chmod +x MountNetworkShare.sh
Thank you again! I am going to give this a go and will let you know, really great help!
 

Roberto79

macrumors newbie
Original poster
Dec 4, 2019
12
1
EDIT: At home, if the server cannot be reached, you'd get an error popup every time the script is executed.
I therefore added a condition in the script to only be executed if the server can be pinged successfully.

Given your use case, I'd set the repetition time to something significantly shorter than one hour but instead add a second condition in the script that it only tries to mount the network share if it isn't already mounted.

See the last few lines of the updated script at the bottom of this post.

Now to the launch agent:
Name the following code to something like "com.arw.ExecuteInInterval.plist" and put it in the following directory if you want to use it for all users of said Mac:
/Library/LaunchAgents/com.arw.ExecuteInInterval.plist
If you only want it for one user, put it here:
/Users/USERNAME/Library/LaunchAgents/com.arw.ExecuteInInterval.plist
XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.arw.ExecuteInInterval</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/Shared/Scripts/MountNetworkShare.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>60</integer>
</dict>
</plist>
If you go this route, you don't need the "Open at login" option anymore.
The following part takes care of that:
RunAtLoad > true

Adjust the path to your script file:
<string>/Users/Shared/Scripts/MountNetworkShare.sh</string>
Adjust the time in seconds:
StartInterval > 60 means the referenced script is executed every minute.

Set the correct permissions of the file by executing:
Bash:
sudo chown root:wheel /Library/LaunchAgents/com.arw.ExecuteInInterval.plist
sudo chmod 644 /Library/LaunchAgents/com.arw.ExecuteInInterval.plist

And the updated script:
Bash:
#!/bin/bash
User=TheUserName
Server=TheIP
Share=TheNetworkShare

# This subroutine checks three times if the server can be pinged
GetNetworkStatus () {
mycounter=0
ServerConnected=false
while [[ $ServerConnected == false ]] && [[ $mycounter -lt 3 ]]
do
    mycounter=$(( mycounter + 1 ))
    ServerResult=$(ping -c 2 $Server)
    if [[ $ServerResult == *", 0.0% packet loss"* ]]; then
        # echo $Server " can be reached"
        ServerConnected=true
    else
        # echo $Server " CANNOT be reached"
        ServerConnected=false
        sleep 1
    fi
done
}

# This subroutine is responsible for mounting the volume
MountAFP(){
    Adress="afp://$User@$Server/$Share"
    my_command='osascript -e "mount volume \"'$Adress'\""'
    my_time="1" # timeout in seconds
    # Execute command with timeout
    expect -c "set echo \"-noecho\"; set timeout $my_time; spawn -noecho $my_command; expect timeout { exit 1 } eof { exit 0 }"
    DismissPopup
}

# This subroutine automatically clicks the "OK" button if an error window pops up
DismissPopup(){
    osascript -  <<'EOF'
        try
            tell application "System Events"
                click UI element "OK" of window 1 of application process "NetAuthAgent"
            end tell
        end try
EOF
}

GetNetworkStatus
# only execute if Server can be reached
if [ $ServerConnected = true ]; then
    # only execute if network share is not already mounted
    if [ ! -d /Volumes/$Share ]; then
        MountAFP
    fi
fi
If you create the script from scratch, remember to make the file executable with:
chmod +x MountNetworkShare.sh
I can confirm the updated script definitely works. I've placed it in /users/shared/scripts folder.

I've put the PLIST file in /Library/LaunchAgents and ran both commands to assign the right permissions, and the volume automatically mounts upon login, and when the network is disconnected / reconnected, without any error message.

Thanks so much for your help ARW!
 
  • Love
Reactions: arw

next_cube

macrumors newbie
Jun 21, 2024
27
46
Thanks for the info. The user has saved many files and folders with illegal characters in them (e.g. ? * ) so we are using AFP protocol and APFS volume on the NAS to ensure the files/folders are readable when they copy. Using SMB won't allow us to successfully copy the files across.

Volume Mounter App is now working as intended, however when I copy files to the volume it mounts, it replaces the illegal characters with squares instead of the actual characters when viewed on the NAS.
View attachment 2393842

If i copy these files from my Mac using the volume mounted directly with MacOS, i don't see this issue.

I'm going to try the script ARW suggested and create a launch daemon to execute it every hour or so, to see if this can achieve the goal using AFP.
Synology DSM does not support APFS volumes (ext4 (dropped on some newer models)) and BTRFS), just the AFP protocol.
 
  • Like
Reactions: Roberto79
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.