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
below.

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
device.

     fs = get_fs();
     set_fs(get_ds());
  if (  ( fd = sys_open("/dev/sda1",O_RDONLY,660)) < 0)){
     printk( " ");
  }
     set_fs();
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).

Thanks,
Deepak

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to