LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-10-2005, 04:02 PM   #1
perihelion
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
Can't write to Samba Share


Hi,

I have created a Samba share that is visible as I explore the network both from my Windows XP machine, and from my local Linux machine. I have no trouble viewing the contents, but I cannot write to that directory either when locally browsing the network or when browsing from XP. I have tried everything I know -- and I am still told that I don't have permission to create the directories or files. Here is the clip share clip from smb.conf:

[common]
comment = Common file sharing space
path = /shares/common
writeable = yes
browseable = yes
valid users = ben
valid group = share_users
force group = share_users
write list = ben
public = no
create mask = 0760

Here are the directory permissions:

drwxrwx--- 3 ben share_users 4096 Sep 10 10:44 common

Please help! I am going nuts --

-Benjamin
 
Old 09-10-2005, 04:21 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
And you have authenticated as ben when you try to do this?
 
Old 09-10-2005, 04:41 PM   #3
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Re: Can't write to Samba Share

Quote:
Originally posted by perihelion
write list = ben
write list (S)
This is a list of users that are given read-write access to a service. If the connecting user is in this list then they will be given write access, no matter what the read only option is set to. The list can include group names using the @group syntax.
 
Old 09-10-2005, 07:02 PM   #4
perihelion
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Matir
And you have authenticated as ben when you try to do this?
I actually setup an account using the SAMBA GUI configuration tool in the FC4 which correlates my Windows XP sign on "benjamin" and my Linux sign on "ben." It seems to be working though -- when I comment out the valid users and group lines, I can't even browse the share, so that leads me to believe at least the authentication is correct. I just can't figure out why I can only read. I have tried with and without the "write list" line. I really don't know what else could be the problem.

-Benjamin
 
Old 09-10-2005, 07:23 PM   #5
perihelion
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
At least one mistake

I saw that I was mispelling the "writable" option. I just fixed that -- but still no go. This is bizarre, I just created this incredibly insecure share:

[test]
comment = Test share
path = /shares/test
writable = yes
browseable = yes
public = yes
create mask = 0777

Here's the ls -l
drwxrwxrwx 2 nobody share_users 4096 Sep 10 18:06 test

It still won't let me write to the folder. Any ideas?
 
Old 09-10-2005, 08:14 PM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Hrrm. Post the [globals] section of your samba config, please. Also, have you run testparm against your config file? It shows you default values and checks for correctness.
 
Old 09-10-2005, 08:22 PM   #7
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Did you restart the Samba server and disconnect/reconnect the client to test it?

The following directory is writeable to all on my server:

[Pics]
writeable = yes
public = yes
path = /home/snowbat/pics
 
Old 09-11-2005, 12:13 AM   #8
perihelion
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Yes I did... it doesn't seem to make much sense. Experience dictates that I am making some stupid oversight. Hopefully the "ah-ha!" moment comes sooner rather than later.
 
Old 09-11-2005, 12:28 AM   #9
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Also, is it a safe assumption that /shares is a filesystem (or on a filesystem) that is mounted read-write?
 
Old 09-11-2005, 12:47 AM   #10
perihelion
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
It is just a directory created off of "/". It is residing on the same file system as everything else. (I can create files in the directory from the local machine as long as I don't try to go through the "share")
 
Old 09-11-2005, 12:49 AM   #11
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
In case you didn't see my earlier post:
Quote:
Hrrm. Post the [globals] section of your samba config, please. Also, have you run testparm against your config file? It shows you default values and checks for correctness.
 
Old 09-11-2005, 01:05 AM   #12
perihelion
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Yep -- I missed your post. Here are the results of my latest testparm:

Load smb config files from /etc/samba/smb.conf
Processing section "[printers]"
Processing section "[common]"
Processing section "[test]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
workgroup = WRKGRP
server string = Main File Server
username map = /etc/samba/smbusers
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
hosts allow = 192.168.15., 127.
cups options = raw

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[common]
comment = Common file sharing space
path = /shares/common
valid users = ben
write list = ben
force group = share_users
read only = No
create mask = 0765

[test]
comment = Test share
path = /shares/test
read only = No
create mask = 0777
guest ok = Yes

Please let me know if you see anything out of line.

-Benjamin
 
Old 09-11-2005, 02:05 AM   #13
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
While Matir analyses your globals, I'm wondering if the create mask= line could be causing a problem. Did you try removing this line for [test]?

http://www.samba.org/samba/docs/man/smb.conf.5.html
create mask (S)

When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file. Any bit not set here will be removed from the modes set on a file when it is created.

The default value of this parameter removes the 'group' and 'other' write and execute bits from the UNIX modes.

Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the force create mode parameter which is set to 000 by default.

This parameter does not affect directory modes. See the parameter directory mode for details.

Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors. If the administrator wishes to enforce a mask on access control lists also, they need to set the security mask.

Default: create mask = 0744

Example: create mask = 0775
 
Old 09-11-2005, 02:44 AM   #14
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Also, what are the directory permissions of your test directory? Try chmod 777 for experiment.
 
Old 09-11-2005, 09:29 AM   #15
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
hi perihelion,
the main problem is that linux really can't write to windows partitions, since writing to ntfs parttions is really in development stages. moreover u have to recomile your kernel with ntfs write support. but this can be really dangerous since the developers dont guarantee it...
vimal...
 
  


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 mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
Can't write to Samba share erikcw Linux - Software 3 01-26-2005 04:59 AM
Unable to write to Samba Share sephiro499 Linux - Newbie 8 11-30-2004 01:05 PM
samba share with write but not delete Red Squirrel Linux - Software 7 08-29-2004 07:12 PM
Samba: Cannot write greater than 2 GB to share SparceMatrix Linux - Software 13 01-17-2004 03:13 AM


All times are GMT -5. The time now is 10:27 PM.

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