[clug] usb device opening problem

Deepak Katagade deepak.ckm at gmail.com
Sat May 5 07:12:51 GMT 2007

Hi All,
I am trying to access the usb device through the samba.After device is
mapped through the samba I am trying to open the device in my samba
code  to get the information of the device. My  device is detected as

brw-rw---- 1   root  disk  8, 1 Dec 31 1969   /dev/sda1.

But through samba a different user will be logging in and trying to
access the device.In my samba code i am trying to open the device  to
get the file descriptor and its info.I am following steps to open the

    fs = get_fs();
 if (  ( fd = sys_open("/dev/sda1",O_RDONLY,660)) < 0)){
    printk( " ");
When try to do this i will  get the error saying.
"Error in opening the device file -13"

But before opening if I change the group manually as below.
 chgrp -R user   /dev/sda1
I am able to open the device.

Please anybody can u tellme if there is any way to open my device
without changing the group manually.

I am using linux-2.6 kernel and my device will be automounted as
/dev/sda1    /content/media/sda1  type vfat (rw, noexec,nosuid, nodev,umask=0).



More information about the linux mailing list