Kurt Granroth wrote: > On Sunday, September 7, 2003, at 10:42 PM, Jeff Barker wrote: > >> I don't want anyone to be able to unmount it, there would be no >> reason for that. I just want it shared to everyone on my local >> network and be readable AND writeable. > > [snip] > >> Yeah, I read all that. I tried both options and that doesn't give the >> proper permissions to the drive, it only allows the user to unmount >> and remount it. I know there's gotta be someone else who uses samba >> to share a drive as a storage drive for multiple windows machines. > > > Yes, that's pretty much samba's entire reason for being. I've shared > many a Linux drive to Windows machines using it. > > There are a number of gotcha's that you have to look out for. > > First, don't bother trying to mount or unmount any of the ext drives > as any particular permissions. It doesn't matter. What matters is > the permissions of all the files and directories on the drive. As > long as all of the files and directories are world read and writeable, > then everything will be fine.... well, it will be if you also remember > to set 'public = yes' and 'read only = no' in your smb.conf file. > ok, here's what my smb.conf file looks like. Does this look about right? ----------------------- [global] workgroup = MYWORKGROUP server string = "Samba" hosts allow = 192.168.5. 192.168.14. 127. netbios name = mynetbiosname load printers = yes printing = cups log file = /var/log/samba.%m max log size = 50 security = share encrypt passwords = yes ssl CA certDir = /etc/ssl/certs socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 wins support = yes dns proxy = no guest account = myuser [printers] comment = All Printers path = /var/spool/samba browseable = yes guest ok = yes writable = yes printable = yes [Home] comment = Home path = /home/myuser/home browseable = yes public = yes guest ok = yes writable = yes force directory mode = 0777 create mode = 0666 [Media] comment = Media path = /home/myuser/media browseable = yes public = yes writable = yes guest ok = yes force directory mode = 0777 create mode = 0666 [Storage] comment = Storage path = /home/myuser/storage browseable = yes public = yes writable = yes guest ok = yes force directory mode = 0777 create mode = 0666 [win_c] comment = Windows Directory path = /home/myuser/win_c browseable = yes public = yes writable = yes guest ok = yes force directory mode = 0777 create mode = 0666 ----------------------- the home share is a whole drive that is ext2 the other 3 are all vfat I was able to chown myuser:users all 4 mounted locations recursively. (each of these shares are all hard drives mounted in fstab) > Second, if you start out the drive with all directories 777 and all > files 666, then things should be fine at first.. until the first > person on a Windows machine writes to the drive. Then, the inherited > permissions of the logged in samba user starts to take precedence. I > know that in various times, I solved this problem in a few different > ways. Once, when I was also exporting the drive via NFS, I resorted > to having a cron job do a chmod -R 777 every so often. Another time, > when the drive was *only* used as a Windows Share, I mapped all > incoming uids and guids to the same thing. > ok, here's the issue I have with that... after chowning everything myuser:users, I tried to chmod 777 each mount point and only the ext2 one would take. chmoding the other 3 did nothing. They all stay drwxr--r-- which seems to work fine in linux and samba... I can write just fine from windows. So now, it's just the "Home" share I'm having problems with. So I logged in through SSH su'd to root and began testing it. I can't copy anything into the drive from the other drives even with root... I get this error: cp: cannot create directory `./blahblah dir': Input/output error So.... I'm dropping away from samba for now and just trying to get the permissions on these mounted drives to work properly inside linux before starting to deal with samba.... PS... here's what the folder structure looks like in the users home directory: drwx--x--x 7 myuser users 4096 Sep 7 23:11 ./ drwxr-xr-x 5 root root 4096 Sep 6 16:33 ../ -rw------- 1 myuser users 1151 Sep 7 21:58 .bash_history -rw-r--r-- 1 myuser users 3394 Sep 6 16:33 .screenrc drwx------ 2 myuser users 4096 Sep 6 16:34 .ssh/ drwxrwxr-x 3 myuser users 4096 Sep 7 23:21 home/ drwxr--r-- 16 myuser users 16384 Dec 31 1969 media/ drwxr--r-- 5 myuser users 16384 Dec 31 1969 storage/ drwxr--r-- 9 myuser users 16384 Sep 7 23:28 win_c/ and here's my fstab file: /dev/hda1 /home/myuser/win_c vfat rw,uid=myuser,gid=100,dev,exec,auto 1 0 /dev/hde1 /home/myuser/media vfat rw,uid=myuser,gid=100,dev,exec,auto 1 0 /dev/hde2 /home/myuser/storage vfat rw,uid=myuser,gid=100,dev,exec,auto 1 0 /dev/hdg1 /home/myuser/home ext2 users,suid,dev,exec,auto,rw,async 1 0 should I change all these options to "defaults"?