You are not logged in.

#1 2009-01-17 14:00:32

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Can't write to samba shares as any user but root.

I can mount shares, and I've specified every parameter I think could make a difference, but can't write to shares as any user but root.

archangel $ sudo mount -t cifs -o guest,uid=barrucadu,gid=users,file_mode=0777,dir_mode=0777,rw //masonlap/share /share/mason/
archangel $ touch /share/mason/file
touch: cannot touch `/share/mason/file': Permission denied

This doesn't help either:

archangel $ sudo chmod 777 -R /share
archangel $ touch /share/mason/file
touch: cannot touch `/share/mason/file': Permission denied

Offline

#2 2009-01-17 14:33:07

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Can't write to samba shares as any user but root.

Errr... lemme see.

As far I know (I haven't used samba in ages, so I'm taking the rust from my brain away) you need to allow root to access samba shares. How are you building the smb.conf? By hand? or by swat?


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#3 2009-01-17 14:39:58

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Can't write to samba shares as any user but root.

By hand, here's my smb.conf

[global]
   workgroup = HOME
   server string = Linux SAMBA Server
   security = user
   hosts allow = 192.168.1. 192.168.0. 127.0.0.1
   load printers = no
   log file = /var/log/samba/%m.log
   max log size = 50
   dns proxy = no 

[share]
   comment = SAMBA File Sharing
   path = /srv/share
   read only = no
   public = yes
   writable = yes
   create mask = 0777
   guest ok = yes
   browseable = yes

Last edited by Barrucadu (2009-01-17 14:41:47)

Offline

#4 2009-01-17 14:57:05

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Can't write to samba shares as any user but root.

ok, I think I found a way to help you.

First, change the security from user to share.
Second, add 'invalid users =' (thats right, 'invalid users =') to the end of your share block.

p.s. SSHFS is ten times easier to setup big_smile

I hope it helps.


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

Board footer

Powered by FluxBB