LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2006, 03:09 PM   #1
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
Samba - Create mask not working...


I've got both my directory mask and my create mask set to 0777 in my smb.conf file, but for some reason, all the files written in the share are written with 766 permissions. The directories all have 0777 permissions (except the directories directly beneath my share mount point.

Here's my setup: I've got one share mounted, and in the share 6 directories. No one is allowed to write to the share except for in those 6 directories, and group permissions are set to define which users can access which directories. However, if I try to create a file from Windows into one of the directories, the permissions given that file are 766. I'm wondering if this has to do with Samba at all, if mayhap the create mask doesn't take effect because I'm writing to directories beneath the mount point instead of directly beneath it? Any ideas?

~Myles
 
Old 02-10-2006, 03:36 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
create mask sets the maximum permissions that can be set, not the permissions that will be set. What is the umask for the user accounts that are creating the files - you'll probably need to modify that. Also, to keep the group ownership for new files you'll probably have to use the set gid bit on the directories.
 
Old 02-10-2006, 03:41 PM   #3
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks for the reply!

I don't set group ownership for new files being created because you can only get into a certain directory containing the files if you're in the group that owns the directory. Anyone that can get into the directories can modify them in any way they want, which is why I'm trying to set the permissions to 777.

As for setting the umask...I'll admit, I'm quite the Linux newbie, and I'm not sure how to set that. Is that something you manually put into one's bash profile, or is there a command that can be used? I know of the umask command, but I'm not sure whether or not you can use that to set permissions for the way the users write their files.

Thanks again for your help.

~Myles
 
Old 02-10-2006, 03:58 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
OK, it may be quicker to just add the force create mode and force directory mode options to your samba conf file. They work the way you probably expected create mask and directory mask to work. There's more info at http://us1.samba.org/samba/docs/using_samba/appb.html, but basically:
Code:
force create mode = 0777
force directory mode = 0777
should do what you want - do you need the executable bit set on files? Will 0666 do it just as well?
 
Old 02-10-2006, 04:55 PM   #5
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Original Poster
Rep: Reputation: 15
Many thanks.

I don't feel that the executable bit needs to be set. That's my boss' opinion. I don't know that we'll even have executable files on our file server, but it's not really my call.

Thanks for the reply!

~Myles
 
Old 02-10-2006, 04:57 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Yeah - I get a lot of technical advice from non-technical people at work too
 
  


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
Webmin firewall using ip chains - samba/ip mask trekk Linux - Networking 1 11-11-2005 11:58 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
Samba - Create Mask/Mode anilnatha Linux - Software 8 07-26-2004 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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