Samba - cannot make writeable shares
Hi guys,
I'm configuring a new samba server (samba-3.0.25b-2.fc7) on a FC7 box. What happens is that I login to the server with user samba, I can enter and read from shares, but cannot write in any share that I (try to) make writeable. First I configured the shares manually from examples, then I tried with the GUI (system-config-samba-1.2), when all failed I tried to make writeable shares with SWAT but still no luck. the smb.conf is: Code:
[global] Code:
[root@## tst1]# pwd And there are no errors in the log files. Anyone could help me out with this please? :) |
I am still relatively new to Samba myself, however, I am wondering if your entry: "read list" is causing issues. Blurb from "man smb.conf" says:
########## start ########### read list (S) This is a list of users that are given read-only access to a service. If the connecting user is in this list then they will not be given write access, no matter what the read only option is set to. The list can include group names using the syntax described in the invalid users parameter. Default: read list = Example: read list = mary, @students ########## end ############## I read that as saying that even though you have "samba" user set to writable that the fact he is also listed in "read list" means they wont get write access. I know I didn't use that value at all when I set up my, working, test boxes. |
Is the samba user a system user. If so, don't login as that user, and create a new user and group instead.
Generally, the directory you are sharing will be owned by the user and group owner that matches the smb.conf values. Also set the sticky bit on the directory itself if more than one user has write permissions. I can't tell if you are trying to create an anonymous share (which usually uses the guest user) or if you happened to give yourself the username of samba. Look for the "Samba 3 by Example" book supplied either by your samba or samba-doc package. You may be trying to implement a share similar to their no-frills server examples in chapter 1. That said, I did create a /home/samba directory on my laptop, and created this share: Code:
[samba] After making a change, I used ssh to connect to another host (delllap) where I ran konqueror to test the new samba share. I was to lazy to walk over to the other computer! This technique allows you to experiment with different smb.conf configurations. |
zQUEz:
I tried removing that, same thing, no luck. jschiwal: The samba user is a system user, I've added it to the smbusers and created a password with smbpasswd, the server accepts this login when I view a share. I'm not trying to create anonymous acces, I just named the test user samba. Also I tried your share configuration and still no change. (btw, yes, I restarted the service) One thing I forgot to mention, if I try to delete a file, it won't give an error message, but the file will be there when I refresh. On the other hand when I put readonly = Yes it gives me an error when trying to delete. So this makes me think that samba creates the share writeable, but something goes wrong somewhere else. I'll try the book also, but since it accepts the delete, I don't think the smb.conf is the problem. |
I still don't get the purpose of the samba share or what you are trying to accomplish. Who uses the share? How many users will use this server? I noticed that you are using tdbsam as a backend database instead of smbpasswd. But you seem to be using /etc/passwd and /etc/shadow for authentication of the samba user. Usually, tdbsam is used when you have at least 50 users and don't want to have to replicate the users & passwords among the different hosts. It doesn't seem that you have set up anything like that so maybe you want to use smbpasswd instead.
|
I'm just trying to make a few writeable shares. The server will be used by 20 users maximum. I'll make a samba user for each person using it but for now I just use the samba username for testing.
The tdbsam I just picked up with a sample config on the samba website if I remember right :). I'll switch back to smbpasswd, but the users work right, the writeable share doesn't. |
Are your clients all on windows? If so it would be a good idea
to set `security = user' on [GLOBAL] That is, if you want them to have an smb password set on server. You can also set it to share and they won't be asked for login Take a look at the following smb.conf and compare with yours. [global] workgroup = workgroup netbios name = file-server server string = Linux Samba Server encrypt passwords = yes security = share local master = no socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 [homes] read only = yes browseable = no writable = no [win] comment = All windows data sotrage path = /home/west/win public = yes read only = no browseble = yes writable = yes write list = west create mask = 755 See if you are missing something. This configuration works well for windows clients on my LAN. If you have any linux clients please post the way you are mounting. -W |
All the clients are Windows XP.
I've tried your conf, no change. I need security = user but I've tried share and I still can't write. (from what I've read, default is user, I've also added it specifically and no change) Dunno what else to do to it, nothing works :scratch: |
Can you please post your `fstab' configuration on the samba server?
-W |
Code:
[root@## /]# cat /etc/fstab |
try running the chown and chmod commands on the folders that are shared on the same server?
does that change anything at all? |
No.
Already tried chmod 777, 1777, 775 with owner samba and others. |
All right, if I understand what you posted you are sharing
your root. Anyways. This is what you'll need. Code:
|User |To access and write to: |Must have | first configuration using: ug+rwx and users can access and write to each other home shares as long as they are in the same group in the samba server. Also note that each user needs to have the exact same username and password for samba credentials - smbpasswd. The second configuration is not safe, but its the best I can do for windows logins that has spaces in the username and don't want to change it. You can always suggest an alias or migrate the user to a one word username, its the users choice if (s)he is the boss. Let me know if this information helps. -W |
No, I want to share some folders so that users will be able to store shared data in them.
It is not a permission problem, I already tried all combinations at least 5 times :) Dunno what I'm gonna do with it. |
tpn
I gave you the most common scenarios, so you could adapt from those. But so far you haven't tell us what you have done, haven't posted any error messages, and the little configuration you have shown seems very obscure for me, or anyone here to figure out your problem. We don't know if you want to share a single folder to everyone or you want to create individuals. Its very hard for that second scenario in the table to fail. While I was writing it, I did: -Create a test user on Win XP. -Create a shared folder on an existing user on samba server ---chmod'ed it to uo+rwx -Added the share folder to smb.conf -restarted samba ******** *Note, smbpasswd for the test user isn't even necessary in this configuration. **Note, this configuration is not safe And I could read/write right away. More information please. -W |
I don't have any clue why it didn't work, but, as a last resort I've done a yum remove samba, got the sources from samba.org, recompiled it all, tweaked the init script from the rpm, paths, files, and now it works just fine with the same folders, permissions, owners, shares, conf, smbusers, smbpasswd.
|
All times are GMT -5. The time now is 11:17 PM. |