How to add execute permissions to a USB Flash Drive ext4 (for steam)

This is what I think I need to do (Steam) Mount ext4 partition with exec permissions, but I am not sure how to add the exec to the mount permissions, as the USB drive currently has the noexec permission, I'm wondering how to change this so I can use it for steam. (I hope this makes sense)

Update: Here's the relevant line from the mount output:

/dev/sda2 on /var/host/media/removable/James type ext4 (rw,nosuid,nodev,noexec,relatime,dirsync,data=ordered)
  • Please provide the output of mount | grep '/dev/sdX' with your USB drive mounted, where /dev/sdX is its device file descriptor (you can check which one it is with the output of lsblk). – Byte Commander Oct 17 '16 at 23:20
  • /dev/sda2 on /var/host/media/removable/James type ext4 (rw,nosuid,nodev,noexec,relatime,dirsync,data=ordered) this? – The Borg Captain Oct 17 '16 at 23:26

You can remount a device with exec option (the opposite of noexec) using this command:

sudo mount -o remount,exec /PATH/TO/MOUNTPOINT

Just replace /PATH/TO/MOUNTPOINT with the correct mount point, so in your case it would be:

sudo mount -o remount,exec /var/host/media/removable/James

After that, check the output of mount | grep '/dev/sda2 again to make sure the noexec option is gone. There will probably not be any exec option listed though, because that's the default.

| improve this answer | |
  • If this answer solves your problem, please consider accepting it by clicking the gry check button on its left. Thanks and welcome to Ask Ubuntu. – Byte Commander Oct 17 '16 at 23:31
  • worked, almost but unplugging the drive caused it to revert – The Borg Captain Oct 17 '16 at 23:39
  • Yeah, this command remounts it with different options only once. To make that persistent, you would have to add a rule in /etc/fstab. – Byte Commander Oct 17 '16 at 23:44
  • ok, I think I found a resouce to help me do that help.ubuntu.com/community/Fstab#ext2_and_ext3 – The Borg Captain Oct 17 '16 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.