LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-29-2006, 10:38 PM   #1
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
Samba on FC5 won't let me use group share


Hello all!

Well it has been a while but I finally have found time to spend on my Linux box again. Anyway lets get down to business right away!

I am trying to get my Samba share folder to allow a GROUP read/write but it wont' let it. I am wondering if the Samba permission are set wrong. See I have read a fair a bit about it now and I still can get it to work like the good old tutorials and other documents say it should. SO I COME HERE TO SEEK ADVICE!!!

Here is what a share looks like:

[test]
comment = test samba
path = /home/samba/test
writeable = yes
browseable = yes
valid users = brendan, kris, test


IN this particular share the USER test also has brendan and kris attached to the group (unix-group), so technically this share should work? Unless I am completely dumbfounded. I mean I can see it but I can write to it what so ever?!?!?!

Please help! Thank you.....
 
Old 11-30-2006, 09:43 AM   #2
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
You must go in and set the Linux file permissions to match what you are trying to allow samba to do. They must match. So, if you have some individuals who are in group "sales" in their samba permissions, they must also exist in the same group for Linux login and for the directory/file permissions.

So you have to insure that when you have a file, say "Novembersales", when you ls -al and look at the file permissions, it must have the group sales in the group area.

Does all of that make sense? Give it a go and repost.
 
Old 12-02-2006, 10:23 PM   #3
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Ok so I have done as follows:

created a "group" called test, not a linux/unix user just a group. i then added kris and brendan to that group. i then went into the shell and tried to change owner ship of the group root to test and it gives me and error, invalid user. i am guessing that i have to have a user named test and then in the grouip add kris and brendan.

i do recall trying this many a time. please read and re-confirm that i have not done anything wrong!

thank you for your responce!
 
Old 12-03-2006, 04:09 PM   #4
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
In order to change any of those kind of attributes, you must be root or have the root priviledges. When I get ready to do those kinds of things, I usually su - and then hit enter. Then it will ask you for the root password, which you enter and then hiththe enter key. You can do it like that or set the sudo users. You will have to have the root password form when the Linux OS was installed. Try that and repost.
 
Old 12-03-2006, 11:59 PM   #5
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Yes I have done this as root. However I have been doing most of the settings through the GNOME desktop interface which prompts you for the root password to change user, samba, services, etc. It should have worked.....

What should the file permissions be? Example 775? 755? obviously this affects the users ability to do things but because I am setting a group does the privileges have to be different?

I would think that making a user a member of a group would give the user the permissions of that group as long as they were the owner of that file or directory.

Cheers,
Brendan
 
Old 12-04-2006, 01:40 AM   #6
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Add this to your [test]
[test]
comment = test samba
path = /home/samba/test
writeable = yes
browseable = yes
valid users = brendan, kris, test
directory mask = 0775
create mask = 0775
force group = test


Or change to whatever permission you like, such as 0777 or 0770. Problem solved, assuming your Linux file and group permissions are set up correctly. Now your users in group 'test' can read/write and share as a group via SAMBA.

It seems like what everyone else is suggesting is a Linux permission issue. I'm assuming you're taking it from a SAMBA configuration point of view. Both are easy to resolve.

Last edited by Micro420; 12-04-2006 at 01:45 AM.
 
Old 12-05-2006, 12:24 PM   #7
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
By adding:
Add this to your [test]
[test]
comment = test samba
path = /home/samba/test
writeable = yes
browseable = yes
valid users = brendan, kris, test
directory mask = 0775
create mask = 0775
force group = test


Basically I am setting the permissions through Samba, correct? How ever if I were to set it through Linux by changing lets say:

drwxr-xr-x 2 root test 4096 Nov 29 21:05 test (original permission)

drwxrwxr-x 2 root test 4096 Nov 29 21:05 test (new permissions)

When I set the permissions this way anyone can write to the file/directory who is given access. The problem is that I should just be able to give access to the "group" and the members of the group should have the permissions of the group. By adding what you have suggested it should work. I had read that adding those few fields would help just didn't want to try it yet as I was trying to understand the difference between setting the Linux/UNIX permissions verse SAMBA.

I will try your suggestion and see what happens.

Thank you!
 
Old 12-05-2006, 01:32 PM   #8
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
That is good. Let's look at how this is all set up to make sure that everything is okay. Remember, Linux is your OS and Samba is an application that allows Windows users to have access to the Linux box. So, the basic file/directory permissions will have to first allow the Linux users to that file (and do with it as the permissions allow). This would be tested by logging into the machine as the Linux user and see if you can in fact do with as you seem fit. The next step is to make sure that the Windows users can do what they need to. The first part of this is through Samba. Set up the smb.conf file to give them that permission(s). Then, when Samba hands it off to Linux for authentication and permissions, Linux will check to make sure that they once again have permissions to do what they are trying. As far as the Linux file structure, when you do the "ls -al" on the directory and you see the "drwxrwxr-x" (or whatever), the first three indicate what the files owner can do. r=read, w=write, x=execute. The next three letters indicate what the group can do. The next three indicate what a guest could do (or third party app). The "d" indicate a directrory. So, if you have the group "sales" and they need to access a particular file and the file is owned by John Smith, you should see something like this: drwxrwxr-w johnsmith sales (file size and last modified date follows). If that is all cool and Samba is set up correctly with the proper access/permissions, you should be off and running. Take alook at all of that and repost!
 
Old 12-06-2006, 09:24 AM   #9
jahjr
LQ Newbie
 
Registered: May 2006
Posts: 7

Rep: Reputation: 0
for what it is worth:
In a terminal window, go to the folder containing the folder you want to open to the test group. enter ls -l. The owner should probably be root. The group should be test. If not, enter chgrp test [name of folder]. Hope it helps but no guarantees

Joe
 
Old 12-09-2006, 12:10 PM   #10
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Thumbs up

Success, I think.

Well I have my samba shares working. Here is how they are set up:

user(s) in Linux:
brendan
kris

group(s) in Linux:

samba (members: brendan)
media (members: brendan, kris)

shares:
/home/samba
drwxrwxr-x 3 root samba 4096 Dec 6 22:32 samba
/home/samba/media
drwxrwxr-x 2 root media 4096 Dec 6 22:32 media


I had to change the permissions on the directory/files which are being shared in order for the groups to be allowed read/write. I originally thought that but I thought SAMBA would configure those settings automatically.

Cheers and thank you for all your help!
Merry Xmas!
Brendan
 
  


Reply



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 01:35 AM
searching samba share breaks connection to share Elomis Linux - Server 1 05-11-2007 12:28 AM
Samba domain member server (DMS) group permissions in network with a Samba PDC srosa Linux - Networking 0 05-01-2006 05:55 PM
Simple Samba Setup, Share & Not Share timmywo Linux - Software 4 07-30-2004 07:27 AM
Samba: What group/user is used by Samba to access directories? DJ_Cyberdance Linux - Networking 3 10-04-2003 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration