Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to 'chmod' on an NTFS ( or FAT32 ) partition?

I'm using LastPass as my password manager, and I use Sesame for multifactor authentication. On Windows this was no problem, but I alternate between Windows and Linux computers, so I need to have Sesame available for both cases.

On my laptop I'm running Ubuntu 10.10, and I downloaded the 32bit LastPass Sesame (Ubuntu 10.04 LTS) and moved the files (an executable and a .bin) to my USB device. As instructed, I tried to run chmod +x sesame on the executable (whose name is sesame).

I tried this from the terminal window, but when doing an ls -la afterwards I noticed that the permissions on the file hadn't changed a bit. I tried doing the same adding sudo at the start, but that didn't make any difference either (and I didn't get any kind of error message or anything). I also tried doing it the "graphical" way, by right-clicking on the executable in Nautilus > Properties > Permissions, and trying to check off the Allow executing file as program check box - the checked marked only disappeared again after a second.

If I moved the same executable to my hard drive, it worked very fine to make it executable (and execute it).

I'm not really experienced with Linux, so I suspect I'm missing something obvious. Might it have something to do with the USB being fat32 (but I thought files on a fat32 partition should be executable by default?), and if so - what are my options?

And just to have said it: it works very fine to run the Windows version of Sesame using Wine, but it's a bit of a hassle (at least if I need it somewhere Wine isn't already installed).

share|improve this question

marked as duplicate by psusi, Octavian Damiean, Marco Ceppi Nov 3 '11 at 2:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 5 down vote accepted

You can't chmod fat32 files... . only linux filesystems "accept" linux permissions.

Easiest way would be to execute it from your home folder, for instance.... Copy it there and chmod it, then execute it as you were trying before, but at the new location.

Also you can check this: Basically, it talks about knowing if the file is really a binary one or it's a text script with the .bin extension. If this is the case, you can execute it with bash, python, ruby or whatever.

share|improve this answer
I kind of suspected that, but how then can I execute the file from the USB device? – Nailuj Jan 24 '11 at 21:26
I edited the answer... hope it helps. – luri Jan 24 '11 at 21:33
ok, guess I'll be just as good off by using the Windows version through Wine then. Thanks. – Nailuj Jan 24 '11 at 22:03
Just out of curiosity btw: are there any special reason why I didn't get any kind of error message what so ever when I tried to run chmod +x sesame on the executable on the USB drive? Such an error message would have cleared things up instantaneously... – Nailuj Jan 25 '11 at 7:19

See this answer. You basically can define permissions when mounting the device. In your case, you would do something like:

sudo mount -t vfat -o rw,user,umask=000 /path/to/device /path/to/mount/dir

For a permanent change, you can add this to your /etc/fstab:

  • Find the UUID (Universally Unique Identifier) of your device using sudo blkid.
  • Add the mount line to /etc/fstab:

    UUID=your-uuid /path/to/mount/dir vfat rw,auto,user,umask=000 0 0
share|improve this answer
thanks, that's another possible option. However, the point with the Sesame multifactor authentication on an USB drive, is that it should be quick and easy to plug it into any random computer. I just want to plug it in (Ubuntu auto-mounts it for me), click the executable and get my one-time key, so compared to that this is kind of a hassle. But I'll take note of it just in case :) – Nailuj Jan 25 '11 at 7:15
@Nailuj If you can reformat your flash drive, I think formatting it ext4 (probably with journaling disabled) should allow you to change permissions. Note though that this will prevent you from using your flash drive with Windows machines. – starbeamrainbowlabs Oct 14 '15 at 10:42

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