Problem accessing shared USB drive from windows

Hi guys,

               I am using OpenSUSE 12.3 with XFCE DE.When I insert a pen drive it is mounted in /run/media/$USER/.Now I have added this location in smb.conf file to share the pen drive over the network.But when I try to access the pen drive from the windows it shows " Windows can't access \\ipaddress\path\.When I unmount and mount in any other location like /home/user/usb and share it it is accessible. What may be the problem. Also I want to access the usb share without any samba password.

   Thanks in advance.

Your best bet for sharing any folder with Samba is to make a permanent mount in your /etc/fstab file, in my opinion. As a USB device, you can add in the option called nofail, to prevent a system hang when the drive is not plugged in and you can install it later and use the “sudo mount -a” terminal command to get it working again. For help with Samba, please look at my blog on the subject here:

S.A.C.T. - Samba Automated Configuration Tool - Version 1.06 - Blogs - openSUSE Forums

Thank You,

Hi nishanth9042,

The problem may be related to UNIX permissions. On my system, when I mount my USB FAT32 drive, it has read, write and execute bits only for the user who mounted the drive (I guess this is because FAT32 knows nothing about permissions). So, if I were sharing it with Samba, nobody except the user who mounted the drive could have access to it.

As jdmcdaniel3 said, you should make a /etc/fstab entry for you pen drive. You could add noauto and user options so it isn’t mount at start-up and normal users can mount it without root privilege. I usually add also nofail.

Also I want to access the usb share without any samba password.

   ...]

You should use guest ok in the Samba share definition. The guest user account is mapped to nobody:nobody by default, so the UNIX permissions must be set accordingly.

Thanks for the replies but I don’t want to add pen drive in /etc/fstab but instead I want the pen drive to be automatically mounted with write permissions.As I said when the pen drive automatically mounts in /run/media/$USER the permissions are 600 but when I unmount and mount in another location the permissions are 777.So I want the permissions to be set to 777 for automatic mounting also.

I can only say that the auto mount function is not really intended to be shared by Samba and is temporary in intent. You would need to find out how the auto mount sets the permissions, but its not going to change the root folder from which it mounts. Setting up the fstab file for a single pen drive using nofail will do what you want with Samba.

Thank You,

Ok thanks for your suggestions.I will give that a try.