My old box running ubuntu 9.04 passed away, so I plugged a flash drive into a newer box running ubuntu 16.04.

But, I can't run scripts from there, because all files lost the x-permission. I can copy those files, but I can't chmod them, not even chmod a+w, not even using sudo.

chmod returns with no errors, echo $? shows 0.

It all worked perfectly on 9.04.

Here is what mount says:

/dev/sdd1 on /media/user/LABC type vfat   

I am aware of https://askubuntu.com/a/17550/778232 and I don't think it's a duplicate.

Firstly, with my problem here, not only +x is ignored. Secondly, the file where the answer proposes a change does not exist on my box.

Edit: What I don't understand, if FAT does not support linux-like flags, why did it work with ubuntu 9.04?


Nope, this didn't work. I unmounted the device, created a new directory, mounted it with

mount /dev/sdd1 /media/LABC -o dmask=000,fmask=111

I can see the files, but still cannot chmod or chown (as root user). chown gives "Operation not permitted".

  • @Melebius just what I wrote in the question: it's not only the x flag, but w too, and the answer does not solve the problem because it refers to an non-existing file. Maybe it is close enough to a duplicate that it may be merged. – Gyro Gearloose Apr 2 '19 at 12:29
  • chmod does not work on vfat only on ext or when mounting through fmask and dmask – Rinzwind Apr 2 '19 at 12:30
  • @RoVo Thanks, I will try sudo mount /dev/sdb1 /media/flash -o dmask=000,fmask=111, but currently I'm recovering my update data from another USB drive and don't dare to mess too much with mount as long as it is running. – Gyro Gearloose Apr 2 '19 at 12:31

In my honest experience, If you have a dual boot computer then you're lucky and you can try "Repair this drive" in Windows. This usually fixes my problems.

  • Thank you, but I'm not using "enemy software" ;-) . Further, I don't think the file system is broken. It worked a week ago under 9.04, and two other flash drives behave exactly the same. Very unlikely that all 3 of them should be damaged in exactly the same way. If everything else fails, I will copy the data,format them with a better file system (ext3, for example) and store the data back. – Gyro Gearloose Apr 3 '19 at 13:27
  • @Melebius "Unfortunately, this does not answer the chmod question at all.", yes, but very unfortunately, no one else did or could or did care for an answer. – Gyro Gearloose Jan 6 at 16:00

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.