# Samba won't allow write access and seems unstable.

## CasimirEffect

Sorry about the double whammy.

I know I've done something stupid here, I just can't tell what it is.

I have this entry in my smb.conf file:

[public]

   comment = Public Folder

   path = /home/samba/public

   public = yes

   writable = yes

   printable = no

Even though I have write enabled nobody is able to write to the folder. Is there something I'm missing?

Also, Samba seems to be very unstable transfering files from the server. The server can download and compile for days, once I start playing MP3s or moving large files though the server using samba it will crash in a matter of minutes. This one has me totaly stumped. Any guesses?

Thanks in advance!

----------

## Ramses

 *CasimirEffect wrote:*   

> Even though I have write enabled nobody is able to write to the folder. Is there something I'm missing?
> 
> 

 

Additionally to the rights defined in the share-definition in smb.conf the user needs the right within the unix-filesystem to write into that directory.

Perhaps you forgot that.

Ramses

----------

## stary

 *CasimirEffect wrote:*   

> 
> 
> [public]
> 
>    comment = Public Folder
> ...

 

Yes... if you want only nobody to write in there, you need to do something like this:

```

guest account = nobody

(...)

[public]

   comment = Public Folder

   path = /home/samba/public

   public = yes

   writable = yes

   printable = no

   only guest = yes

```

otherwise all writes in the directory will be done using the username of whoever is accessing the share, not the guest user.

Regards,

/Stary

----------

## CasimirEffect

 *stary wrote:*   

> 
> 
> Yes... if you want only nobody to write in there, you need to do something like this:
> 
> ```
> ...

 

Haha, sorry I forgot "nobody" was a user  :Wink:  What I meant to say was none of the accounts can write.

Who's on first.

----------

## stary

 *CasimirEffect wrote:*   

> 
> 
> Haha, sorry I forgot "nobody" was a user  What I meant to say was none of the accounts can write.
> 
> 

 

That's what happens when I don't pay attention...   :Embarassed: 

What are the file permissions on the directory then? You might want to set it in a /tmp-like way, i.e. full access for everyone but sticky, as in:

```
chmod 777 /home/samba/public

chmod +t /home/samba/public

```

That done, it should work - I have some directories that are set up essentialy just like that and they work fine.

/Stary

----------

## CasimirEffect

Thanks for the help, I needed to adjust the chmod settings. Now I have a public rwx folder a read only music folder and one owner only folder for each person on the network.   :Laughing:   I'm not sure about it's stability though, it's been going okay for an hour or so, but it could go at any minute   :Shocked: 

----------

## mglauche

your problems with stability could be 2 things:

a) network browsing problems 

    set up samba as a wins server ("wins support=yes") and point the win config to it. this will help browsing a lot

b) raw network problems .. check "ifconfig" if there are any errors  :Wink: 

   (or sometimes dmegs, look for messages like TX timeout or so)

----------

## CasimirEffect

Enableing WINS helped a little bit, it's able to go longer without crashing but samba still crashes the server. I know it's not the network because the server is also set up as a router and is able to pass many gigabytes back and forth from several different machines. Once I start using samba to transfer any large amount of data though, it crashes the server. Any clues?  :Confused: 

----------

## CasimirEffect

I cleaned out the smb.conf of all the stuff I wasn't using and it's now running perfectly stable. Thanks for the help!  :Cool: 

----------

