LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 07-02-2003, 04:49 PM   #1
anilnatha
LQ Newbie
 
Registered: Jun 2003
Distribution: Red Hat 8.0, 9.0
Posts: 26

Rep: Reputation: 15
Exclamation Samba - Create Mask/Mode


I've setup samba successfully and I am able to access those shares from my Win/2000 machine.

However in my smb.conf file I've included:

Create Mask 0775
Directory Mask 0775

for each of my shares.

However, whenever I create a new directory or file, it doesn't set them to match what i've specified in the Create Mask and Directory Mask line in my smb.conf file

Am I missing something?

I'm running Red Hat 9.0, Samba 2.2
 
Old 08-04-2003, 06:18 PM   #2
mormop
LQ Newbie
 
Registered: Mar 2002
Distribution: Mandrake8.1
Posts: 18

Rep: Reputation: 0
Samba Permissions

Add the following settings to the relevant share in your smb.conf


force user = reqd-user
force group = reqd-group

Replace the reqd-user and reqd-group to match your requirements. This will force samba to set the owner and group settings to a certain user of group. The create mask and directory mask settings will then set the permissions for the user and group specified.

Good Luck,


Jools

www.technojunkie.demon.co.uk
 
Old 07-15-2004, 11:41 PM   #3
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Re: Samba Permissions

Quote:
Originally posted by mormop
Add the following settings to the relevant share in your smb.conf


force user = reqd-user
force group = reqd-group

Replace the reqd-user and reqd-group to match your requirements. This will force samba to set the owner and group settings to a certain user of group. The create mask and directory mask settings will then set the permissions for the user and group specified.

Good Luck,


Jools

www.technojunkie.demon.co.uk
Is it like this?

Code:
	create mask = 0777
	directory mask = 0777
	force user = subaruwrx
	force group = subaruwrx
The folder permission was correct but the file permission is 766

P.S Whats the difference between create mode and create mask?

Last edited by subaruwrx; 07-15-2004 at 11:45 PM.
 
Old 07-17-2004, 01:47 AM   #4
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
bump
 
Old 07-18-2004, 06:40 AM   #5
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
bump
 
Old 07-18-2004, 08:42 PM   #6
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Anyone?
 
Old 07-19-2004, 07:18 AM   #7
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
up
 
Old 07-19-2004, 11:19 AM   #8
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
up
 
Old 07-26-2004, 06:27 PM   #9
{-_-}
LQ Newbie
 
Registered: Jul 2004
Location: Houston, Tx
Distribution: SUSE 9.0 Professional
Posts: 17

Rep: Reputation: 0
Hi,



I was having similar issues that you had, so what I did use the 'force create mode' directives. Here's a copy of my smb.conf:


[global]
workgroup = Workgroup
os level = 2
hosts allow = 192.168.0.
time server = Yes
unix extensions = Yes
encrypt passwords = yes
map to guest = Bad User
printing = CUPS
printcap name = CUPS
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
wins support = No
veto files = /*.eml/*.nws/riched20.dll/*.{*}/
security = user
server string = Samba Server
add user script =
domain master = false
domain logons = no
local master = no
preferred master = auto
;; ldap server = 127.0.0.1
[homes]
comment = Home Directories
valid users = %S
browseable = no
read only = No
force create mode = 0755
force directory mode = 0755
create mask = 0755
directory mask = 0755
guest ok = no
printable = no
path = /home
[sandbox, web]
comment = The Webs Sandbox
path = /srv/www/htdocs
browseable = yes
guest ok = no
printable = no
available = yes
force create mode = 0755
force directory mode = 0755
force user = ken
force group = webprog
create mask = 0755
read only = no


Also notice, the order in which I use the force options is different from yours. Hope this helps.



-Ken
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webmin firewall using ip chains - samba/ip mask trekk Linux - Networking 1 11-11-2005 11:58 PM
create just a samba user thejackal13 Linux - Software 5 04-05-2005 09:13 PM
samba create mask msound Linux - Networking 1 03-23-2005 08:20 PM
Apache default create mask bbqjeanvaljean Linux - General 1 02-22-2005 08:02 PM
create mask = 0765 br_sriram Linux - Networking 2 11-02-2004 12:22 PM


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