LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-14-2006, 02:06 AM   #1
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Rep: Reputation: 16
samba fc5


Hi all!

I am trying to setup fc5 as a samba server. Have got printersharing to work, and sharing of the users home directories..

But now I am trying to share a folder on that would be a folder that all the users can access but I still want it to be passwordprotected.

The folder is /home/felles_filer

I have three users

user1
user2
user3

All users are members of each others groups

To the folder that I want to share I have done chmod 770 + chgrp user1 + chown user1
In smb.conf I have set valid users = user1 user2 user3 so all can login fine.
writing = yes
create mask = 770

But the problem is;

When some user make dirs/files in the root of the folder other users can delete it or modify it.
But when a user creates a new folder and then put files inside it, then the other users cant delete or modify it, just view it. But if the folder where empty others could delete it.

To me it looks like the create mask only works for the "root" dirs/files.
When I do an ls -l I can see that the dirs/files in the "root" folder is made correctly, but the dirs/files inside the dirs are not got the right permissions.
May the problem be that the folder is in the /home - dir?

Anyone understands the problem and maybe have an idea of how to make it work??

Last edited by fdahl_009; 08-14-2006 at 02:10 AM.
 
Old 08-14-2006, 02:15 AM   #2
centauricw
Member
 
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
What you want to do is make everything in the folder you are sharing with Samba belong to a separate group. Add the users you want access to share to the group. Then use the "force group = <new-group>" (where <new-group> is the name of your group) in the file share section of the smb.conf file. This will force the connected users to create new files/directories as this group regardless of their primary group.
 
Old 08-14-2006, 02:30 AM   #3
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Original Poster
Rep: Reputation: 16
thanks, the thing you explained is working, made the users members of the standard "users" group, so now the dirs/files are created as the user1 + users group. But still, user2 can not delete user1 files, though he is a member of the same users group user1 is, the file permissions is not right yet.

Main Folder
drwxrwx--- 3 user1 users 4096 Aug 14 09:26 felles_filer

Created Folder in felles_filer (created by user1)
drwxr-xr-x 2 user2 users 4096 Aug 14 09:26 Ny mappe

[root@fc5-linux-celeron /home/felles_filer/Ny mappe]# ll
total 12
(file created by user1)
-rwxrw---- 1 tom users 10752 Aug 14 09:26 Ny Microsoft Word-dokument.doc

I thought the permissions for the files would be like the "Ny mappe" folder...

Aint something like force create mask 770 or something?

Other users can not create file/folders inside the folder created by user1

Last edited by fdahl_009; 08-14-2006 at 03:08 AM.
 
Old 08-14-2006, 03:41 AM   #4
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Original Poster
Rep: Reputation: 16
problem solved now!

used:
force group = users
force create mode = 0770
force directory mode = 0770

woohooo!!
 
  


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
Samba on FC5: Some Files and Directories Missing jpence Linux - Networking 6 09-27-2006 12:10 AM
installing a guest FC5 on FC5 xen using NFS niverson Fedora 0 08-11-2006 03:27 PM
1. Noobie install FC5; 2. FC5 spits out garbage after 'starting udev' nja1 Linux - Newbie 2 07-16-2006 02:48 PM
Samba +printersharing FC5 fdahl_009 Linux - Networking 1 06-27-2006 02:28 AM
Boot failure after upgrading FC5 TR3 to FC5 Official Release fsb1284 Fedora 3 03-25-2006 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:40 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