LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba Share Permissions (https://www.linuxquestions.org/questions/linux-newbie-8/samba-share-permissions-57589/)

stever 05-01-2003 12:58 AM

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

jharris 05-01-2003 04:37 AM

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

stever 05-01-2003 02:40 PM

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

jharris 05-02-2003 02:54 AM

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

stever 05-17-2003 02:26 AM

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


All times are GMT -5. The time now is 11:07 PM.