LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't write to Samba Share (https://www.linuxquestions.org/questions/linux-software-2/cant-write-to-samba-share-362146/)

perihelion 09-10-2005 03:02 PM

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

Matir 09-10-2005 03:21 PM

And you have authenticated as ben when you try to do this?

Snowbat 09-10-2005 03:41 PM

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.

perihelion 09-10-2005 06:02 PM

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

perihelion 09-10-2005 06:23 PM

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?

Matir 09-10-2005 07:14 PM

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.

Snowbat 09-10-2005 07:22 PM

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

perihelion 09-10-2005 11:13 PM

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.

Matir 09-10-2005 11:28 PM

Also, is it a safe assumption that /shares is a filesystem (or on a filesystem) that is mounted read-write? :)

perihelion 09-10-2005 11:47 PM

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")

Matir 09-10-2005 11:49 PM

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.

perihelion 09-11-2005 12:05 AM

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

Snowbat 09-11-2005 01:05 AM

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

Snowbat 09-11-2005 01:44 AM

Also, what are the directory permissions of your test directory? Try chmod 777 for experiment.

vimal 09-11-2005 08:29 AM

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...


All times are GMT -5. The time now is 08:51 AM.