# [solved]cifs permission read error on samba share

## mathfeel

I have created a samba share:

```
[mp3_share]

   comment = My music share

   path = /home/music/

   public = yes

   guest ok = yes

   writable = no

   #printable = no

   browseable = yes

   #create mask = 0765
```

and try to access from the same computer using:

```
mount //localhost/mp3_share /mnt/smbmnt/ -t cifs -o user=guest,guest
```

I am able to list all the files, and all the files seems to have the correct mode (rw-r--r-- for file, +x for dir), but when I am try to cat a simple file for testing, I got:

```
$ cat /mnt/smbmnt/list.txt

cat: /mnt/smbmnt/list.txt: Permission denied
```

The files themselves should be readable by user nobody, which is what samba access them as.

I am, however, able to successfully issue "more list.txt" when I am in smbclient prompt.

here are some info. from /var/log/samba/log.217.0.0.1:

```

[2006/12/07 02:31:35, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:08, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:08, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:17, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:20, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:27, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:30, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:42, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:32:51, 0] smbd/service.c:make_connection_snum(840)

  Can't become connected user!

[2006/12/07 02:33:01, 1] smbd/service.c:make_connection_snum(941)

```

Help?

----------

## drjimmy42

Are you sure that samba is using cifs.  I still use smbfs when have samba entries in fstab.  You could also try not specifying an fs type and see if mount can figure it out on its own.

----------

## mathfeel

 *drjimmy42 wrote:*   

> Are you sure that samba is using cifs.  I still use smbfs when have samba entries in fstab.  You could also try not specifying an fs type and see if mount can figure it out on its own.

 

Good call, I can now both list the file and read the files. However, the folder I am sharing in samba has file/directory with name with Chinese characters. Listing the file at the mount point gives bunch of question marks. I tried option iocharset (=utf8, etc) and various codepage, and none is working correctly. Is there some setting I need to tweek somewhere? Again, there seems to be no problem if I access the mount with smbclient. But I want to use it as part of the filesystem so that I can play the mp3 files directly from it.

----------

## drjimmy42

Ouch, sorry but Chinese characters are a bit out of my league.  Maybe the samba mailer might be helpful with that sort of thing.  I'm glad you can read it though.

----------

## mathfeel

I have finally track down the source of my problem with cifs. There appearantly is a bug with samba-3.0.23a. Downgrading to 3.0.22 solved the problem.

----------

