LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-03-2006, 12:13 AM   #1
mosestruong
LQ Newbie
 
Registered: Feb 2006
Location: Sydney
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 0
smb and nautilus


I have a windows share which I would like to access from my linux machine. Some of the files have chinese filenames.

When I use nautilus to connect e.g. //dan/moses
I can connect and see the chinese filenames.

However, when I try to mount it from fstab, using
//dan/moses /mnt smbfs credentials=/root/.smbcredential,iocharset=utf8,codepage=cp850,dmask=0777,fmask=0666,umask=000 0 0

I cannot see those filenames... they appear as something like "s??.txt"

If I create the file using this mnt, then from windows or nautilus, it appears as weird characters like "????.txt"

Does anyone know how nautilus mounts the share? Or does anyone have any suggestions on how I can get around this problem? Thanks
 
Old 06-03-2006, 02:31 AM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
Does that line if fstab helps you? I cannot understand how does it works If you mount that with 'mount' command, so you should assign CIFS in fstab instead of SMBFS. Then you'll get full access to mount options, like codepage and iocharset.
 
Old 06-03-2006, 03:35 AM   #3
mosestruong
LQ Newbie
 
Registered: Feb 2006
Location: Sydney
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Ygrex
Does that line if fstab helps you? I cannot understand how does it works If you mount that with 'mount' command, so you should assign CIFS in fstab instead of SMBFS. Then you'll get full access to mount options, like codepage and iocharset.
Thanks Ygrex - using CIFS as the mount option works - the Chinese filenames display correct.

However, now I have another problem - with the following:
//dan/moses /mnt cifs credentials=/root/.smbcredential,iocharset=utf8,dmode=0777,fmode=0666,uid=1000 0 0

When I create a new file, the permission is set to
-rw-r--r--
however, the user is not me, but a number, so I don't have access to that file...
Are there a way to force the mode of a created file to 666?
 
Old 06-03-2006, 03:56 AM   #4
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
Firstly, iocharset=utf8 does not seems to me fine. I suppose you'll get the same result without this option at all.
For in vfat there's 'utf8' is a distinct option (so 'utf8' instead of 'iocharset=utf8').

Concerning permissions, it seems there's no way to force them.
 
Old 06-03-2006, 04:00 AM   #5
mosestruong
LQ Newbie
 
Registered: Feb 2006
Location: Sydney
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Ygrex
Concerning permissions, it seems there's no way to force them.
Then would you know how nautilus makes the connection? Because if I open and edit a file through nautilus (provided the program supports it like OpenOffice), then the permission seems fine.
 
Old 06-03-2006, 04:38 AM   #6
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
may be it also adds 'ro' option?
 
Old 06-03-2006, 04:57 AM   #7
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
UTF might not have encoding for chinese symbols (at a guess) try researching other ones.

Also you need to set a mask at mount time for the drive, to create files with the correct permissions (NTFS and FAT cannot support Unix permissions).

Lastly you could set your user id to the same as the files for the windows partition, or create another user, with that id for the sole purpose of copying files over.
 
  


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
once again nautilus + smb demiurg Linux - Networking 1 10-20-2006 10:13 AM
nautilus 2.6.0 and accessing smb shares brandor Linux - Software 0 04-19-2004 10:13 AM
nautilus crashes for smb ramu_ak Linux - Networking 0 06-28-2003 01:20 PM
nautilus cannot display smb jdklein1975 Linux - Newbie 2 02-26-2003 08:08 AM
Nautilus smb: not working... hjles Slackware 2 02-12-2003 06:35 PM


All times are GMT -5. The time now is 04:41 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration