LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mount share and see ?'s in the filename (https://www.linuxquestions.org/questions/linux-newbie-8/mount-share-and-see-s-in-the-filename-827011/)

smithaa02 08-18-2010 09:31 AM

Mount share and see ?'s in the filename
 
I'm trying to mount a windows share (that mac users mostly use) using:

mount -t cifs //x.x.x.x/Graphics /mnt/graphics -o username=x,password=x

This mounts ok for the most part, but then certain characters in the filenames are replace with question marks when I execute ll -l.

I then use:

mount -t cifs //x.x.x.x/Graphics /mnt/graphics -o username=x,password=x,iocharset=utf8

This time I don't get the question marks in the filenames, but I do get strange characters there instead. For example, the mac users love to lead their filenames with bullet characters, but iocharset=utf8 translates these to accent a and the cent character (or βΆ). No charset translates the bullet character to a question mark.

Any ideas? Is there a magic charset I need to specify? This is causing me a lot of grief...

Is there a more appropriate forum I should be posting this question to?

jschiwal 08-19-2010 01:48 AM

Are you certain that the filesystem isn't corrupt? I've seen this when I had a corrupt sdcard.

i92guboj 08-19-2010 02:08 AM

utf8 should be the way to go when you want interoperability (that or set the three OSes to use the same charset), but I have no idea about Macs. You might need to configure Windows and Mac to use utf8 by default as well, then look for a procedure to convert all the existing file names to utf8.

smithaa02 08-19-2010 09:06 AM

To jschiwal, the file system definitely is not corrupt. The bullet characters appear perfectly on windows and macs (as well as other trouble characters).

To i92guboj, is there an easy way to detect which encoding windows is using (which is hosting the share) for the drive?

Here is the weird thing and a possible solution... Mounting from Ubuntu's (10.04) "Connect to Server" > "Windows Share" works AND it correctly recognizes the oddball characters in the file names like the bullet (both in bash and in the gnome file browser).

Anybody know how to get that (is it gvfs as opposed to cifs?) mounted automatically in fstab?

i92guboj 08-20-2010 02:46 AM

Quote:

Originally Posted by smithaa02 (Post 4071271)
To i92guboj, is there an easy way to detect which encoding windows is using (which is hosting the share) for the drive?

These days, I know nothing about Windows, and bear in mind that this can be also controlled at application level. There might be some apps using a given code page to encode the file names and some others using a different one as far as I know. Google might know better than I do. :(

In linux I've used a tool called "convmv" to fix this.

Quote:

Here is the weird thing and a possible solution... Mounting from Ubuntu's (10.04) "Connect to Server" > "Windows Share" works AND it correctly recognizes the oddball characters in the file names like the bullet (both in bash and in the gnome file browser).

Anybody know how to get that (is it gvfs as opposed to cifs?) mounted automatically in fstab?
gvfs is not a mounter, it just abstract all the disk-like stuff so the user can forget about the details and click icons on the desktop or the file browser. Internally, it will use mount with cifs or smb to mount the network shares just like you would do on command line.

Once the drive is mounted by gvfs you should be able to retrieve the info you need from the output of the "mount" command. The share should be listed there, along with the mount options. With a bit of luck you will be able to retrieve the right option from there and then just it's a matter of putting the same line in your fstab :)

smithaa02 08-20-2010 09:17 AM

Thanks for your response.

I type mount -l, and all I get for the gvfs mounts are:

gvfs-fuse-daemon on /home/administrator/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=administrator)

So it looks like a thread is taking care of all mounts for gvfs so they don't show up with mount -l?

nodev was new to me so I tried that and still no luck:

mount -t cifs //x.x.x.x/Graphics /mnt/graphics -o username=x,password=x,nodev


All times are GMT -5. The time now is 11:25 AM.