I have read multiple other answers on here to no avail. Clearly chmod and chown are not applicable here.
Here's the problem: I have a USB drive for school in which I have a folder for my programming class, where I do all my C programming. I wrote a shell script that, when called, will create a new folder which contains a template C file and Makefile for that project, all with the name of the lab.
This script works fine on my laptop at home, but because I'm unable to give it execute permissions, it won't run on the USB stick.
Here's what I've tried so far:
chmodandchown, for examplesudo chmod 755 /dev/sdXorsudo chown mrowsell /mnt/SCHOOLand many variations thereupon (which, as stated, won't work)umountandremountwith-o fmask=111,dmask=000(or the other way around, can't remember what the answer said). Also tried-o defaults,exec,noautoand many other suggested variations.Create a new rule in
/etc/udev/rules.dcalled99-school-usb.rules. This solution required many attempts with different lines. Essentially boiled down to this:SUBSYSTEM !="usb_device", ACTION !="add", GOTO="school_rules_end" SYSFS{idVendor} =="8564", SYSFS{idProduct} =="1000", SYMLINK+="school" MODE="0755", OWNER="myusername", GROUP="myusergroup" LABEL="school_rules_end"Of course, the VID:PID are changed to match my USB stick. This still doesn't work.
Add a new entry to
fstab. The problem with this is that the stick may or may not be present at boot, and if it's not present it causes problems. This also doesn't work because theumount/mountoption above is the same thing in a different manner.
So either I'm doing the rules.d entry incorrectly, or I'm missing something else obvious.