OpenWrt Forum Archive

Topic: USB samba permissions on 10.03.01 RC3

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

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??

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.

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.

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

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:


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):

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

(Last edited by robnitro on 18 Sep 2010, 19:21)

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 .

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

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?

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.

any examples of how to use vi?

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.

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

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.

Finally managed to get write access to my FAT32 drive in win 7 by going through the LUCI interface(
System-->Mount points
and in options add in umask=000
so if you followed the guide in the wiki like I did -  this should now read

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??

(Last edited by jason955 on 27 Jan 2011, 00:30)

My Issue got resolved after I changed the

option create_mask '0777'
option dir_mask '0777'

from '0775'

and ran

chmod -R 777 /mnt/share
chown -R nobody /mnt/share

I tried to follow all the methods mentioned on this thread , I still cant write to the samba share. will some one help?

root@OpenWrt:~# cat /etc/config/samba 

config samba
        option name 'OpenWrt'
        option description 'OpenWrt'
        option homes '1'
        option workgroup 'THEMATRIX'

config sambashare
        option name 'rtrshare'
        option path '/mnt/share'
        option read_only 'no'
        option guest_ok 'yes'
        option create_mask '0775'
        option dir_mask '0775'

(Last edited by iamtapu on 4 Sep 2014, 09:20)

The discussion might have continued from here.