[Samba] Cannot create writeable share - tried many different things

Oscar Sodani oscar at sodani.com
Sat Dec 9 02:37:40 GMT 2006


Hi,

I appreciate any help that can be given. For the life of me, I cannot
create a writeable share on a specific box - a fairly new install of
Fedora Core 5. I have posted on several forums over the past 2 weeks,
but haven't gotten anywhere with the advice given, so I'm turning to
this list as my last hope.

This box runs as an NIS client, but I have had no problems with NIS.
The problem occurs whether I use an NIS user, or if I create a user
local to the box.

I apologize for the length of this message (and mind-numbing
thoroughness), but I sincerely want to convey what I have done, step
by step, in order to simplify this as much as possible:

Yum reports this as my samba version :
Name   : samba
Arch   : i386
Version: 3.0.23c
Release: 1.fc5

** I create a directory to share as follows:

[root at jefferson samba]# mkdir /samba
[root at jefferson samba]# chmod 777 /samba
[root at jefferson samba]# chown osc:osc /samba

"osc" is a local account, so I set the local password and the smb
password to be the same:
[root at jefferson samba]# passwd osc
[root at jefferson samba]# smbpasswd osc


** I have simplified my smb.conf to the following, taken from various
docs and how-tos (and I have tried many different variations of this,
using force user, browseable, writable, force group, etc.)

[osc at jefferson samba]$ cat /etc/samba/smb.conf
[global]
workgroup = SCHOOL

[testshare]
path = /samba
read only = No
force user = osc
guest ok = Yes



[osc at jefferson samba]$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[testshare]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = SCHOOL

[testshare]
        path = /samba
        force user = osc
        read only = No
        guest ok = Yes


** As the user osc, I verify that I can create files and directories
in the /samba directory:

[osc at jefferson ~]$ cd /samba
[osc at jefferson samba]$ touch test1.txt
[osc at jefferson samba]$ mkdir dir1
[osc at jefferson samba]$ ls -al /samba
total 28
drwxrwxrwx  3 osc  osc  4096 Dec  8 21:07 .
drwxr-xr-x 27 root root 4096 Dec  8 21:01 ..
drwxrwxr-x  2 osc  osc  4096 Dec  8 21:07 dir1
-rw-rw-r--  1 osc  osc     0 Dec  8 21:07 test1.txt


**I return to my home directory, where I have a file called test2.txt
that I am going to try to upload

[osc at jefferson ~]$ cd
[osc at jefferson ~]$ ls -l
total 4
-rw-rw-r-- 1 osc osc 4 Dec  8 21:07 test2.txt


** I successfully connect to the Samba server on localhost, and can
retrieve files. However, I cannot create a directory or put my
test2.txt file.

[osc at jefferson ~]$ smbclient -U osc //jefferson/testshare
Password:
Domain=[JEFFERSON] OS=[Unix] Server=[Samba 3.0.23c-1.fc5]
smb: \> ls
  .                                   D        0  Fri Dec  8 21:07:57 2006
  ..                                  D        0  Fri Dec  8 21:01:42 2006
  dir1                                D        0  Fri Dec  8 21:07:57 2006
  test1.txt                                    0  Fri Dec  8 21:11:38 2006

                50600 blocks of size 8388608. 47597 blocks available
smb: \> get test1.txt
getting file \test1.txt of size 0 as test1.txt (0.0 kb/s) (average 0.0 kb/s)
smb: \> mkdir dir2
NT_STATUS_ACCESS_DENIED making remote directory \dir2
smb: \> put test2.txt
NT_STATUS_ACCESS_DENIED opening remote file \test2.txt
smb: \> exit


** I return to my home directory and the samba directory. I have
successfully downloaded the test1.txt file, but was not successful in
creating a new directory or putting a new file. You may have noticed
that test1.txt is a zero-length file, but I have also successfully
downloaded larger files with no problem.

[osc at jefferson ~]$ ls -l
total 4
-rw-r--r-- 1 osc osc 0 Dec  8  2006 test1.txt
-rw-rw-r-- 1 osc osc 4 Dec  8 21:07 test2.txt

[osc at jefferson ~]$ ls -al /samba
total 28
drwxrwxrwx  3 osc  osc  4096 Dec  8 21:07 .
drwxr-xr-x 27 root root 4096 Dec  8 21:01 ..
drwxrwxr-x  2 osc  osc  4096 Dec  8 21:07 dir1
-rw-rw-r--  1 osc  osc     0 Dec  8 21:11 test1.txt


As I wrote above, I have tried many different variations in the
smb.conf. I also have tried many different variations of setting
permissions on the directory, including the sticky bit and suid.

I have tried accessing the share from Windows boxes and other Linux
boxes. Reading files is always permitted, but I cannot write files or
create directories.

I appreciate any help anyone can give. I am pulling my hair out over this one!

Oscar


More information about the samba mailing list