All of a sudden I can't write to USB drives. Worked in past.

A recent update must have borked my permissions of changes how USB drives are mounted and accessed. .
I try and write to a USB drive and I can’t.
If I kdesu konqueor and navigate to /var/run/media/flamebait/(usb drive name) I can’t change permission. That is I try to change the permission and the permissions don’t stick.
I make myself owner of the drive and set group to users. That sticks. It says owner can read and write but when I try and copy a file it says it can’t.
I tried on various drives. Same results. This was working just fine before without these gymnastics art all. Now it doesn’t.
How do I fix this?

On 2015-07-11 19:26, FlameBait wrote:
>
> A recent update must have borked my permissions of changes how USB
> drives are mounted and accessed. .
> I try and write to a USB drive and I can’t.
> If I kdesu konqueor and navigate to /var/run/media/flamebait/(usb drive
> name) I can’t change permission. That is I try to change the permission
> and the permissions don’t stick.

If the usb drive is formatted as FAT or NTFS, that’s correct, you can
not change the permissions. Since ever.

So that is no proof of your “problem”. Show another :slight_smile:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I wrote to this very same thumb drive last week.
Trying again today this file will not copy.
So I tried another file.
It copies.
So I examined the permissions on the file I am trying to copy.
I am owner. I have read, write execute permission on that file.
So now this is a different problem.
As A test I wrote that file to a NFS share on a NAS box…
Copied without complaint.
What the heck is up with this one file?
So I look at a file from the same source and try and copy it nope it’s not copying either.
I am owner of the file. I have read write execute permission on that file. Is there a way to hide flags on a file?

Source is a VPS running Debian Wheezy and it’s coming out of environment where I have the same username as on my local system.

With USb drives FAT/NTFS the permissions are synthetic. it being that MS file systems do permissions do not mesh with Linux permissions. So they are faked.

Maybe it is locked from Windows. But I’m pretty sure Linux ignores Windows permission. Maybe non compatible characters? What is the file name??

File name is [BakedFish] Little Witch Academia: Mahou Shikake no Parade - Movie [720p][AAC].mp4
I have no doubt it was likely created on a Windows machine originally.

usb flash drives have a very small life span depending on the manufacturer only a few hundred writes, pulling out the stick before a write was finished might leave the file system damaged you could try and reformat that drive but all data will be lost.

accessing that file on windows is imposible. see the : in it’s name, I’m not sure how windows would react to it, bit it seams that file originated from an OS that can use : as part of a file name (Linux/BSD/OSX)

Filename shows up something else under Windows 7. “_3SQB~L.mp4” I think Windows 7 must have changed the name for something it could deal with?
Windows 7 read the file and copied it off the NAS to the Corsair USB stick.
Flipping weird.
Looks like a Microsoft users problem with filenames and their expectations about what OSes will be able to read them likely contained non printing characters.
OS X Yosemite read the renamed file name and played it.
Windows 7 read the file name and Played it.
openSUSE 13.1 plays the file. Will write to NAS and local drive. Will not any write USB thumbdrive. Reads from thumbdrive fine.

Consider this weird and solved.

It would appear that on Jul 11, FlameBait did say:

> A recent update must have borked my permissions of changes how USB
> drives are mounted and accessed. .
> I try and write to a USB drive and I can’t.
> If I kdesu konqueor and navigate to /var/run/media/flamebait/(usb drive
> name) I can’t change permission. That is I try to change the permission
> and the permissions don’t stick.
> I make myself owner of the drive and set group to users. That sticks. It
> says owner can read and write but when I try and copy a file it says it
> can’t.

You say you made yourself owner of the USB drive?
How did you do that so that it “stuck”
Did you check that it still thinks your the owner afterwards?

I don’t use Konqueror (or any other GUI toy) for that. I much prefer
midnight commander for such things…
Any USB drive or flash drive that I expect to mount and use as a regular
user gets explicitly defined in my fstab
IE:
UUID=7631-C43B /drv-zip/usbZipShuttle/blackNred32GB auto user,noauto 0 0

Where possible I use unique human readable LABEL=label rather than UUID=uuid

Any such device that needs to be limited to an “owner” that isn’t root, I
define in /etc/udev/rules.d/99-local-disk.rules
IE:
SUBSYSTEM==“block”, ENV{ID_FS_LABEL}==“Jimages_desk-9”, OWNER=“jtwdyp”, GROUP=“jtwdyp”
otherwise, upon reboot (ever since udev) the removable drive will be
mounted with root ownership…
Which gets in the way unless you or your GUI tool uses something like pmount…

So have you tried testing if it’s really a permission problem by writing
to the USB drive as root?

> I tried on various drives. Same results. This was working just fine
> before without these gymnastics art all. Now it doesn’t.
> How do I fix this?

I can’t tell you how to check what the update may have changed with
something like your pmount (or similar) configuration. As I don’t use it.
But if root can write to the drive in question without errors, then you
would at least have a better idea of what the problem is


JtWdyP

On 2015-07-11 21:16, FlameBait wrote:
>
> File name is [BakedFish] Little Witch Academia: Mahou Shikake no Parade
> - Movie [720p][AAC].mp4
> I have no doubt it was likely created on a Windows machine originally.

You can not write that file on a FAT or NTFS filesystem, period. It has
a colon (:slight_smile: in the name, and that’s a forbidden character on Windows
filesystems.

Software that handle those multimedia files often have an option to
sanitize names so that they only use allowed characters. If you got the
file via p2p, you often have a list of different names for the same
media file. Some are valid in Windows, some not.

If you later saw the name as “_3SQB~L.mp4”, that’s the 8 character short
name. All files on a current FAT filesystem have a long name, and a
short name (8 chars, +3 for the extension), which is mandatory to have,
and unique in the filesystem. It is nowdays randomly and automatically
generated from the long name. The short name is the one in the true index.

It is possible that a file has no long name, but it always will have a
short name. It is possible that your file lost the long name because it
was illegal. You should verify.

You did not have a permission problem, nor a write problem.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))