Ask Your Question
0

Udev mounted USB HD cannot write special characters

asked 2019-03-30 12:50:17 -0600

estrauch gravatar image

After upgrading to F29, I noticed I was getting errors on backups to external USB Hard Drive. At first I thought it was an issue with rsync. Then I discovered that the USB HD filenames would not accept special chars like ? and : Looking at /etc/mtab, I see the HD mount options as shown below.

/dev/sdb1 /run/media/estrauch/FantomHD fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

If I knew how to add mount option, iocharset=ascii, that would fix the problem. But digging into udev rules is a little beyond me.

Any ideas?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2019-03-31 00:53:34 -0600

villykruse gravatar image

If you did not recreate the file systems as ext4 or some other native linux file system, then the USB hard drive is probably still using ntfs file systems. Windows native file systems such as vfat or ntfs does not allow certain characters in file names. From this answer:

The forbidden printable ASCII characters are:
    < (less than)
    > (greater than)
    : (colon - sometimes works, but is actually NTFS Alternate Data Streams)
    " (double quote)
    / (forward slash)
    \ (backslash)
    | (vertical bar or pipe)
    ? (question mark)
    * (asterisk)
edit flag offensive delete link more

Comments

Yes, that is the solution I'm looking for. I will need to backup my backup drive, and re-format as ext4. Thank you.

estrauch gravatar imageestrauch ( 2019-03-31 15:56:40 -0600 )edit
0

answered 2019-03-30 15:44:29 -0600

sideburns gravatar image

I would be very surprised if those two characters were acceptable in file names as the shell uses them as wildcards. If you really want to use them, surround the name with full quotes, so that the shell doesn't try to expand them. (Using "what?" as a file name would be a good example.) However, you'd have to use those quotes every time you referenced the file.

edit flag offensive delete link more

Comments

I agree that these characters are not wise to use. However I do have files like "what?.flac" already on the external hard drive. Then switched from F28 to F29, and this problem started to appear. BTW

touch "what?" touch "what\?" both do not work on the external hard drive. I can go to my fstab mounted hard drive and >touch what? works just fine, even without the quotes.

estrauch gravatar imageestrauch ( 2019-03-30 16:41:08 -0600 )edit
0

answered 2019-03-30 15:22:59 -0600

estrauch gravatar image

Acutally the characters ? : are ascii characters. But when I do touch x\? to a Hard drive directory, I get following error and no file is created. touch: setting times of 'x?': No such file or directory

Some special characters work like & = ^ ( ) Others do not like * ? :

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-03-30 12:50:17 -0600

Seen: 52 times

Last updated: Mar 31 '19