LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-01-2003, 12:58 AM   #1
stever
LQ Newbie
 
Registered: May 2003
Location: Huntly, Aberdeen - Scotland
Distribution: RH9
Posts: 9

Rep: Reputation: 0
Samba Share Permissions


Hi - New to Linux using Redhat 8.0

Samba share set for user level access, have no problems sharing data on the share. A group called 'office' has been setup for the two users that would access the data (user - 'steve' and user - 'gail'). The users primary group has been set to 'office'
and all the files copied to the share have had the following applied.

find /home/mnsdata exec chgrp office {} \;
(changing the file group to 'office'

find /home/mnsdata exec chmod 774 {} \;
(changing the permissions of folders and files to rwxrwxr-- (774)

Great, but any new file that steve or gail saves to the 'mnsdata' folder saves with
rwxr--r-- (744). I understand that I need to apply umask xxx to each users profile
to ensure that the permissions for any new saved file will be as I wont them.

How and where do I apply umask>? Or is there another way?

Steve
 
Old 05-01-2003, 04:37 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
If they are only accessing the area via samba then you'll probably want to use the following samba options in smb.conf for the specific share
Code:
force security mode = 660
force directory mode = 0770
If you didn't want to change their primary group there is also a force group option.

HTH

Jamie...
 
Old 05-01-2003, 02:40 PM   #3
stever
LQ Newbie
 
Registered: May 2003
Location: Huntly, Aberdeen - Scotland
Distribution: RH9
Posts: 9

Original Poster
Rep: Reputation: 0
Hi Jamie,

Semi sorted the problem, added the two lines in the smb.conf for the specific share, works OK when saving files from the XP workstation on both accounts, but doesn't from the Windows 95 worksation on both accounts.

end up with 764 file perms and 775 folder perms from XP machine and 744 from the Win95 machine, as though the 95 machine ignores the settings. It all seems a little mixed.

Any ideas to test? Do I need to apply something else when logging connecting from a Win95 machine?

Thanks for your help so far.

Steve
 
Old 05-02-2003, 02:54 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Now that is really weird as setting the permissions is not something that the client machine actually see's happening. The smb.conf man page does say (about force directory mode") that
Quote:
This parameter specifies a set of UNIX mode bit permissions that will always be set on a directory
created by Samba. This is done by bitwise 'OR'ing these bits onto the mode bits of a directory that
is being created
which would suggest to me that these setting will always add to the permissions, so if the dir is being created as 0700 or 0711 it will always end up as 0755. Take a look at the descriptions of the following parameters in the smb.conf man page, I'm sure that one combination must do the job!
  • force create mode
  • force directory mode
  • force directory
  • force security mode
  • security mask
Sorry that I can't provide any more useful suggestions this isn't a behaviour I've ever seen (or ever realised was there).

HTH

Jamie...
 
Old 05-17-2003, 02:26 AM   #5
stever
LQ Newbie
 
Registered: May 2003
Location: Huntly, Aberdeen - Scotland
Distribution: RH9
Posts: 9

Original Poster
Rep: Reputation: 0
Jamie,

Sorry I have taken so long to get back and thanks for your help on this one.

Used the following on the samba share:

force create mode = 0755
force directory mode = 0755

gives me a rwxrwxr-- on all files by the two members of the office group and for the moment that will do me. I will have a play and refine this when I have got to grips with file permissions. I am really looking to get rwxrwx--- so that only the owner and the group have access to any files.

Thanks
Steve
 
  


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
Samba share permissions anorman Linux - Software 1 10-22-2005 02:49 AM
I need help setting samba share permissions. trilect Linux - Software 10 08-24-2004 07:56 AM
samba share permissions? psychomaniac Linux - Software 4 04-29-2004 02:22 PM
samba share permissions keep resetting Red Squirrel Linux - Newbie 0 03-03-2004 08:55 PM
WinXP samba share - permissions? armstrj Linux - General 0 04-08-2002 03:40 AM


All times are GMT -5. The time now is 02:41 AM.

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