**SOLVED**
This first post was edited 3 times. The last time Is named
"UPDATE 2/21/2007", thats how I solved the issue.
I can read/browse the share but I can't write. I get the error:
bash-3.1$ cp tux016.pdf ~/smb/every
cp: cannot create regular file `/home/west/smb/every/tux016.pdf': Permission denied
Either windows or linux, as root or user, I get a permission error.
here is my smb.conf:
# Global Preferences
[global]
workgroup = workgroup
netbios name = file-server
server string = Linux Samba Server
encrypt passwords = yes
security = user
local master = no
[homes]
read only = no
browseable = yes
writable = yes
[master]
comment = All data storage
path = /home/west/every
public = no
read only = no
browseble = yes
guest ok = yes
writable = yes
valid users = west
force group = users
valid group = users
write list = west
create mask = 0777
------------------------
fstab file on server:
(The share partition is /dev/hda2)
Code:
/dev/hda3 swap swap defaults 0 0
/dev/hda1 / reiserfs defaults 1 1
/dev/hda2 /home/west/every ext3 defaults,rw 1 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
----------------------
Here is the mount command:
sudo mount -t smbfs //file-server/master ~/smb/every -o rw,umask=000,username=west
Thank you all for your time.
-West
**************
UPDATE 2/4/07
The set permissions on on file-server were:
Code:
drwxr-xr-x 2 root root 16384 2007-02-01 19:50 every/
I changed the partition ID of hda2 with fdisk to:
FAT32 (LBA) - and reformated with: mkdosfs -v -F 32 /dev/hda2
Changed hda2 file system on fstab to vfat and added umask=000 option as well.
Now permissions look like this:
Code:
drwxrwxrwx 2 root root 16384 2007-02-01 19:50 every/
and fstab entry look linke this:
Code:
/dev/hda2 /home/west/every vfat defaults,udev=000,rw 1 0
Now I can write from windows to samba server without permissions
errors. I can write from linux to samba server only on root.
---
*****************
UPDATE 2/21/07
New fstab:
(shared partitions are /dev/hda2 and /dev/hdb1)
Code:
/dev/hda3 swap swap defaults 0 0
/dev/hda1 / reiserfs defaults 1 1
/dev/hda2 /home/west/lin reiserfs defaults 1 2
/dev/hdb1 /home/west/win vfat rw,umask=002,gid=users 1 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
New file server smb.conf:
# Global Preferences
[global]
workgroup = workgroup
netbios name = file-server
server string = Linux Samba Server
encrypt passwords = yes
security = user
local master = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[homes]
read only = yes
browseable = no
writable = no
[win]
comment = All windows data sotrage
path = /home/west/win
public = yes
read only = no
browseble = yes
writable = yes
write list = west
create mask = 755
[lin]
commend = All Linux data storage
path = /home/west/lin
public = yes
read only = no
browseable = yes
writable = yes
write list = west
create mask = 755
New command for mounting smbfs:
sudo mount -t smbfs //file-server/lin /home/west/lin-stored -o rw,uid=west,username=west
I added another 40GB HDD as VFAT. See fstab with the new configurations.
I found the umask option for VFAT partition very important. Se man page
for umask, you'll understand why.
But those usefull options are just for VFAT as long as I understood from
the options list for the reiserfs file system.
What was needed in order to have write permissions was the `uid' option on
the `mount' command for `smbfs'
As an extra step I added a few lines to rc.M and created a little new rc.d
script to auto mount
Added after rc.scanluns snippet in rc.M
Code:
# Mounts smb shares on startup:
if [ -x /etc/rc.d/rc.smbmounts ]; then
echo "Mounting smb shares: /etc/rc.d/rc.smbmounts"
. /etc/rc.d/rc.smbmounts
fi
And created the new script called /etc/rc.d/rc.smbmounts:
Code:
#!/bin/sh
#
# This script is to automount smb shares at startup
mount -t smbfs //file-server/lin /home/west/lin-stored -o rw,uid=west,username=west,password=xxx
mount -t smbfs //file-server/win /home/west/win-stored -o rw,uid=west,username=west,password=xxx
Now I have my smb shared mounted at start up with read and write
permissions.
----