I have trying to get a script to run at startup to mount a flash drive and change ownership on dynamically created files. I have not been successful in getting the script to run. It only runs when I log in a run it under my username.
I am running Stretch version 9.
Basically, I need to run the following in order for my mounted flash drive to work.
cd /media sudo umount /media/usb sudo chmod 777 usb -R sudo mount -t ntfs-3g -o uid=myusername,gid=root /dev/sda /media/usb/
Does anyone have any suggestions for how to get a script to run at reboot on this version? Or where I could go to learn more about it?
Crontab -e does not work. I have tried putting the script into /etc/init.d/ to no avail.
Thank you all so much in advance!