LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2010, 09:31 AM   #1
smithaa02
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu - 10.04
Posts: 7

Rep: Reputation: 0
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?
 
Old 08-19-2010, 01:48 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Are you certain that the filesystem isn't corrupt? I've seen this when I had a corrupt sdcard.
 
Old 08-19-2010, 02:08 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
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.
 
Old 08-19-2010, 09:06 AM   #4
smithaa02
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu - 10.04
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 08-20-2010, 02:46 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by smithaa02 View Post
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
 
Old 08-20-2010, 09:17 AM   #6
smithaa02
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu - 10.04
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need a script that will copy based on filename and then move to a network share when mrgreaper Linux - Newbie 6 09-27-2009 08:21 PM
How can I mount a NFS share that have a SMB share mounted? perezyanez Linux - Networking 2 09-26-2008 09:03 AM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 11:28 AM
Changing Filename on Samba Share from XP InEeDhElPlInUx Linux - Software 17 04-20-2004 08:29 AM
Can't change filename with SMB share InEeDhElPlInUx Linux - Security 0 04-01-2004 07:08 AM


All times are GMT -5. The time now is 07:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration