LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-25-2006, 06:20 AM   #1
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Rep: Reputation: 15
I can't write on share samba directory


Hi, please help me, i can't write on the share samba directory, insted, i can read it.

os:Fedora core 6 with samba install

[
Quote:
root@maal samba]# rpm -qa | grep samba
samba-client-3.0.23c-2
samba-3.0.23c-2
samba-common-3.0.23c-2
Samba directory
Quote:
drwsrwsrwt 3 pmr480 pmr480 4096 Nov 24 21:59 pmr480
Quote:
[root@maal samba]# smbstatus

Samba version 3.0.23c-2
PID Username Group Machine
-------------------------------------------------------------------
3657 pmr480 pmr480 acer-pzdv2amelz (192.168.2.151)

Service pid machine Connected at
-------------------------------------------------------
pmr480 3657 acer-pzdv2amelz Sat Nov 25 22:33:44 2006

Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
3657 502 DENY_NONE 0x100001 RDONLY NONE /usr/pmr480 . Sat Nov 25 22:33:45 2006
3657 502 DENY_NONE 0x100001 RDONLY NONE /usr/pmr480 . Sat Nov 25 22:33:45 2006

rede : Hub ; 192.168.1.1 Net access; 192.168.2.1/255 intranet
outher os: Win Xp;win 2000, and one win Me
my smb.conf are this on



Quote:
; Options affecting Samba behavior
;
[global]
workgroup = RG
server string = Samba Server
max open files = 5000
load printers = Yes
printcap name = lpstat
printing = sysv
security = user
encrypt passwords = yes
create mask = 0777
directory mask = 0777
;socket options = TCP_NODELAY
dns proxy = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

;
[homes]
comment = UNIX Home Directories
path = %H
writeable = Yes
valid users = %S
browseable = No
oplocks = False
level2 oplocks = True
read only = No
;
[printers]
comment = All Printers
path = %H
printable = Yes
browseable = No
guest ok = No
writable = No
printer name = Epson880

;
[pmr480]
path = /usr/pmr480/
public = yes
read only = no
writable = yes
printable = no
locking = yes
#oplocks = False
level2 oplocks = True

Last edited by maal; 11-25-2006 at 04:53 PM.
 
Old 11-25-2006, 11:36 PM   #2
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 30
I just set up a samba server today and I ended up having similar problems.

First:
Did you use Fedora's GUI tool or did you manually configure it? Are you having this problem from just your linux machine and are you able to write using the Windows machines? How are you trying to access and write to the share? (I.E. linux command-line, windows explorer, konqueror, nautilus, etc....) What error messages did you get?

This is fresh in my mind from merely hours ago:
On the linux side, the folder that I mounted to with smbmount (you can use mount -t smbfs or mount.smbfs... it's all the same) it had to be done as root and therefore the folder in which the share is mounted became owned by root.root and not username.users. It caused the folder to be read-only for everyone and writable only by root. I passed -o rw,uid=###,gid=### to the mount command to make sure that it was mounted for my username ownerships. You can get those ownerships by doing:
Code:
grep <username> /etc/passwd
and third and fourth fields are your uid and your gid respectively. What also helped for me was that the actual folders on the server that are being shared had permissions of drwxrwx--- (chmod 770).

The other thing you want to do with your level of security is make sure that the usernames match. If the passwords don't then you should be prompted but as long as the usernames match you shouldn't have a problem. Either that or allow for the use of a guest account if a username can't be matched... you haven't set that up so I'm assuming that's not a road you'd like to travel. I only mention it because public = yes is in your share options so it's possible you can see your stuff but you can't write to it because you aren't logged in.
EDIT: Each user needs an account on the server itself which is added to to samba either through the GUI tool or the smbpasswd command.

One thing I just can't help you with is SELinux. Google around or search here for SELinux Samba or something and see if you can trace some symptoms but without knowing any specifics I do know that SELinux can sometimes cause grief if left alone.

If you check out the Samba-3 HOWTO you'll get some fantastic information. What I did was I started here and modified the smb.conf file option by option as I read on and testing the network after each modification. I learned a lot and it works pretty well but I'd recommend some patience and a "can-do" attitude. Take into account that Fedora does things a little differently.

I'm not a Samba guru so without more information I can't help you much more right now. That and I'm quite tired. Good luck and let us know how you make out.

Last edited by zetabill; 11-25-2006 at 11:42 PM.
 
Old 11-26-2006, 06:28 AM   #3
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,438

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
The solution is to add fmask=777 to the options in your /etc/fstab for your samba mount.
 
Old 11-26-2006, 08:24 AM   #4
coolb
Member
 
Registered: Apr 2006
Location: Cape Town, South Africa
Distribution: Gentoo 2006.1(2.6.17-gentoo-r7)
Posts: 222

Rep: Reputation: 30
try chmod'ing or chown'ing the samba share directory...
 
Old 11-26-2006, 08:34 AM   #5
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by allend
The solution is to add fmask=777 to the options in your /etc/fstab for your samba mount.

It does not modify nothing, customer windows it continues not to have writing permission, reading and only copies
Quote:
# Chmod 777 /etc/fstab
#/etc/init.d/smb restart
been thankful, allend
 
Old 11-26-2006, 08:42 AM   #6
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by coolb
try chmod'ing or chown'ing the samba share directory...
The directory has permission of reading and writing for owner, group, to outher, as pods to verify below.
Quote:
drwsrwsrwt 3 pmr480 pmr480 4096 Nov 24 21:59 pmr480
Been thankful in the same one
 
Old 11-26-2006, 10:26 AM   #7
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Original Poster
Rep: Reputation: 15
it has reading/writing permission

new: Share all, it has a directory that it has reading and writing permission meets in /usr/tmp.
 
Old 11-26-2006, 10:29 AM   #8
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Original Poster
Rep: Reputation: 15
News

news: Share all, it has a directoria that it has reading permission and writing meets in /usr/tmp.
 
Old 11-27-2006, 03:20 AM   #9
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,438

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
I did not mean change the permissions of your /etc/fstab, but rather add the option to the line for yout samba share in /etc/fstab.
 
Old 11-27-2006, 08:15 AM   #10
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by allend
I did not mean change the permissions of your /etc/fstab, but rather add the option to the line for yout samba share in /etc/fstab.
Allend, can you be more specify.


Thanks in advance
 
Old 12-18-2006, 07:57 AM   #11
maal
LQ Newbie
 
Registered: Apr 2006
Location: Lisbon (PT)
Distribution: Fedora Core 6 - Fedora 8
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for all your help guys. I am finally up and running.

Solution passed for smb share part of home directoria of user. Instead of /usr/pmr480 - > /home/pmr480/share.

Special thanks to ZetaBill.

Last edited by maal; 12-18-2006 at 07:59 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't write to Samba Share perihelion Linux - Software 21 03-12-2012 10:39 AM
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
Why can I not write to a SAMBA share when read/write is enabled? eric m Linux - General 4 08-21-2006 09:22 PM
Samba - can't write to share rels Linux - Software 2 05-26-2006 12:39 PM
Can't write to Samba share erikcw Linux - Software 3 01-26-2005 03:59 AM


All times are GMT -5. The time now is 07:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration