Mounted volume not accessible

I'm trying to mount an external volume:

/bin/mkdir -p /Volumes/share /sbin/mount -o nosuid,-d=777 -t smbfs //user:pwd@host.local/share /Volumes/share

The script runs as a Daemon, no error. The share is visible from Console (whith root privileges) and the mounted share has all privileges enabled:

drwxrwxrwx  1 root  wheel  16384  2 jan 21:19 share

However I cannot even list the content (

ls -l)
of the mounted share unless I use root privileges. It's this normal?

This problem appeared only after upgrading from High Sierra to Catalina and I wonder if the later is more restrictive and how to make it work.

Accepted Reply

Finally, after many turns, I've found what's going on:


/bin/bash needs to have Full Disk Access privileges. In order to do so I went to Apple Menu > System Preferences > Security & Privacy, selected Privacy tab, unlocked the settings and added /bin/bash to the list.


Now I can read and write the mounted share.

Replies

Finally, after many turns, I've found what's going on:


/bin/bash needs to have Full Disk Access privileges. In order to do so I went to Apple Menu > System Preferences > Security & Privacy, selected Privacy tab, unlocked the settings and added /bin/bash to the list.


Now I can read and write the mounted share.