Topic: USB samba permissions on 10.03.01 RC3

i can access the samba share of my usb HDD fine but i cant write to it, i dont have the permission apparently
it is ext3 filesystem
Windows 7
hotplug2 is automounting the usb fine at boot (/dev/sda1 /mnt/sda1)

Any ideas??

Re: USB samba permissions on 10.03.01 RC3

I'm having the same problem with my wzr-hp-g300nh, the drive will show up in my network but I have no write permission.

WZR-HP-G300NH [Backfire 10.03.1-rc3]

Re: USB samba permissions on 10.03.01 RC3

I am having simmilar issues . I have set up a share to /etc and another to a directory I created called /tcuts. all access settings withing samba are the same. I can access and do what i like to the /tcuts/ files , but the /etc/ files  will only alow read. After changing the access on the /etc/file i was trying to edit in /etc to 777 i could read /write it.

It is a permissions issue.

Re: USB samba permissions on 10.03.01 RC3

i seemed to have solved it by:
chmod -R 777 /mnt/sda1
chown -R nobody /mnt/sda1

i home these survive a reset

sadly the usb transfer speeds are only 7MB/s for some reason

5 (edited by robnitro 2010-09-18 17:21:21)

Re: USB samba permissions on 10.03.01 RC3

For samba3 I figured out how to tune it well.  First delete /etc/config/samba.  Then edit /etc/samba/smb.conf to what you want to setup.
Key features that helped my transfer speeds is to use vfat,ext3, or ext4; as NTFS-3g can be slow as it is cpu limited.  When is overclocking going to be available for the G300NH????
Add this to the [global] section:

socket options =   TCP_NODELAY SO_KEEPALIVE IPTOS_LOWDELAY

As for the permissions, I had similar issues.  If I run my backup script, the files show up with permissions for root, and my samba use is under nobody:nogroup, so the files created in putty don't seem to be accessible, but anything I create in samba through windows has proper permissions.  This worked for me, it allows me to delete, edit, add files to folders owned by root (which were created during a backup script on the router):


[usb]
        path = /mnt/usb
        browseable = yes
        user = nobody
        writeable = yes
        read only = no
        create mask = 0777
        directory mask = 0777

Re: USB samba permissions on 10.03.01 RC3

robnitro wrote:

... delete /etc/config/samba ... edit /etc/samba/smb.conf ... Add this ... socket options =   TCP_NODELAY SO_KEEPALIVE IPTOS_LOWDELAY

You can also just add that to /etc/samba/smb.conf.template .

Re: USB samba permissions on 10.03.01 RC3

what do you use to edit these files, should i install a text editor? nano?

Re: USB samba permissions on 10.03.01 RC3

yeah, how do you edit or delete files thought telnet or ssh, I did get my shared folder writable except a weird thing happened, I disconnected my drive to move it to a permanent place on my desk and when I plugged it back in the pics and music I transfered to it were gone but the drive spaced still showed up as being used, also does anyone know how to format a drive with ext3 while its connected to the router?

WZR-HP-G300NH [Backfire 10.03.1-rc3]

Re: USB samba permissions on 10.03.01 RC3

bbutlerau wrote:

what do you use to edit these files, should i install a text editor? nano?

Nano works, but vi is already installed... just use vi.

Re: USB samba permissions on 10.03.01 RC3

any examples of how to use vi?

WZR-HP-G300NH [Backfire 10.03.1-rc3]

Re: USB samba permissions on 10.03.01 RC3

Just google "vi"... there's a ton of info.  It's worth learning, as vi is standard on every Linux distro.  Here's a good tutorial:
http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html

Re: USB samba permissions on 10.03.01 RC3

what are you guys getting for transfer speeds to your usb storage? Mine is around 4.5-5 Megs/sec which is probably the slowest speed I've ever heard of for a a usb 2.0 drive.

WZR-HP-G300NH [Backfire 10.03.1-rc3]

Re: USB samba permissions on 10.03.01 RC3

i get about 4-7mb which is also veeery slow

Re: USB samba permissions on 10.03.01 RC3

from the little reading I've done on google it sounds like a problem with the whole kmod-usb2 package but if I remove that package my usb drive won't mount although it should be compatible with whichever package was the 1.1 drivers. I might try reflashing and skipping the usb2 package and see what happens.

WZR-HP-G300NH [Backfire 10.03.1-rc3]

Re: USB samba permissions on 10.03.01 RC3

Finally managed to get write access to my FAT32 drive in win 7 by going through the LUCI interface(192.168.1.1):
System-->Mount points
and in options add in umask=000
so if you followed the guide in the wiki like I did - http://wiki.openwrt.org/inbox/buffalo/wzr-hp-g300h  this should now read
rw,sync,noatime,nodiratime,umask=000

16 (edited by jason955 2011-01-26 23:30:01)

Re: USB samba permissions on 10.03.01 RC3

I was having a similar problem to the first three posters- I could access the SMB shares, but could not write to them.  I was able to fix the problem by adding 'umask=000' to the options section of the /etc/config/fstab file:

config 'mount'
        option 'options' 'rw,umask=000'
        option 'enabled_fsck' '0'
        option 'enabled' '1'
        option 'device' '/dev/scsi/host0/bus0/target0/lun0/part1'
        option 'target' '/mnt/usbdisk'
        option 'fstype' 'vfat'

Here are the permissions on the folders in the /mnt directory.  The first drive, hd, was mounted with the standard options.  The second drive, usbdisk, was mounted with the, 'umask=000' option.

drwxr-xr-x    1 root     root            0 Jan 26 21:05 hd
drwxrwxrwx    2 root     root         4096 Jan 26 22:14 usbdisk

Is it possible to add this to the wiki since it seems like a common problem??