Hello Community,
since a few hours I try to create a little script to mount a smb share. Before the script mount the share he check it. If it is not mounted he mount it.
It works ok... Now I have a few permissions problem...
The Script create a folder called "Intranet", then he mount it. It works but I can't see the Intranet because the folder get the wrong permissions. The folder get the permissions root:wheel but I need "User":admin or "User":"Domain Group
Via Terminal I can see all files as root... My question, how I can change the permissions to the corretcly?
Here is the actuelly script:
#!/bin/bash
# Already mounted check
user=`ls -la /dev/console | cut -d " " -f 4`
isMounted=`mount | grep -c "/Volumes/Intranet"`
if [ $isMounted -ne 0 ] ; then
exit 0
fi
# Mount the network home
mkdir /Volumes/Intranet
sudo mount_smbfs //xxxx.xxxx/xxx/Intranet/Intranet/ /Volumes/Intranet
# end tell
# Script End
exit 0
I hope erveryone can help..
Many Thanks!
Christian