samba help: cant share, read or write mounted hdd
September 07, 2010 02:44PM
well, ive been scouring the internet for answers, but i still havent been able to set up a simple nas using samba. i posted this same topic at another forum where questions like mine would be more prevalent, but i havent had any answers. heres what i posted:

so after searching and reading, and searching some more, im stuck. i cant seem to get a mounted thumb drive to give write access. first thing to know is that, im using a seagate dockstar with a primary thumb drive[sda1] booting debian and samba. secondly, im a total newbie when it comes to linux. im pretty much learning as i go lol.

i guess you could say im still in the testing phase, just trying to make sure files can be shared, mounted and accessed by users. the problem is stated as the title. i have successfully shared a folder in sda1 with rw access, but i cant do the same for the second drive[sdb1].

for sda1 with rw access, here are the smb.conf settings:
[shared]

path = share
available = yes
valid users = mark
read only = no
browsable = yes
public = yes
writable = yes
/share is owned by mark:mark

sdb1 is almost identical, except the path = share/USB2
however, /USB2 is owned by root:root; cant seem to change this. could this be the problem?

sdb1 fstab:
/dev/sdb1 /share/USB2 vfat rw,user,auto 0 0
mtab:
/dev/sdb1 /share/USB2 vfat rw,nosuid,nodev,noexec,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 0
im not really sure what to do. ive tried adding:
create mask = 777
directory mask = 777

any help would be appreciated, thanks!



Edited 1 time(s). Last edit at 09/07/2010 02:44PM by coldchillen.
Re: samba help: cant share, read or write mounted hdd
September 08, 2010 05:14AM
not sure, but as root cant you just do "chown -R mark /share/USB2" ?

or did you try that and it doesnt want to change owner of USB2?
Re: samba help: cant share, read or write mounted hdd
September 08, 2010 09:06PM
tried running that command for that dir, but for some reason it wasnt allowing me. /shrug

one way around it is using the desired hdd for storage for the debian install and using that to boot debian. id rather use a 2gb stick for the system files and use the storage hdd separately if possible. still cant figure it out.

thank you for the reply btw..
Sebastian
Re: samba help: cant share, read or write mounted hdd
September 09, 2010 01:42PM
vfat does not know anything about rights. If you mount the drive as root, all files and dirs on the drive belong to root. Use parameter
umask=0000
to mount the drive and exchange the 0000 with the id of "mark".
Apart from that take a look in samba's logs or start samba with "smbd -i" to have it print logs to the screen. Normally samba tells you want's wrong.
Re: samba help: cant share, read or write mounted hdd
September 11, 2010 03:09PM
thanks for the reply, sebastian. ill be sure to give this a try when ive some more free time. much appreciated!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: