I have mounted a windows shared folder to a raspberry pi directory using
sudo mount.cifs ip_address_windows_machine/folderpath /home/pi/shared_folder -o user=MY_USERNAME,password=MY_PASSWORD
The owner group for the shared_folder changes to root:root after the above command. How can I avoid that, I need the owner group of the /home/pi/shared_folder to be pi:pi only.
I have tried sudo chown -R pi:pi /home/pi/shared_folder after mounting. But the owner group doesn't change from root to pi. Please suggest a method to change the owner group from root to pi after mounting the common folder(from windows).