LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   smb and nautilus (https://www.linuxquestions.org/questions/linux-software-2/smb-and-nautilus-451093/)

mosestruong 06-03-2006 12:13 AM

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

Ygrex 06-03-2006 02:31 AM

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.

mosestruong 06-03-2006 03:35 AM

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?

Ygrex 06-03-2006 03:56 AM

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.

mosestruong 06-03-2006 04:00 AM

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.

Ygrex 06-03-2006 04:38 AM

may be it also adds 'ro' option?

ethics 06-03-2006 04:57 AM

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.


All times are GMT -5. The time now is 01:35 PM.