SELinux Vs SAMBA Vs Inhertited Permisions, HELP!

Associate
Joined
9 Nov 2005
Posts
767
Location
places..
Hello,

I have an ubuntu file-server with a samba share. The permissions are either 0777 or 0666 across the whole share, so any client (win32 or *nix) on the network can read and write to any part of the share as they like. This seems to work pretty well with ubuntu and XP clients, now there is a problem...

My problem seems to be with inherited permissions, (via ownersip) of new files/directories. When a new file is uploaded to the share it may be read only (or other restrictions) for other users, now to fix this I contemplated adding a cron job / shell script that used "chmod -R 0666" (or similar) to run every, say 30mins and change to the correct permissions, but that is clumsy and erm just bad! I then thought, how does windows do this? Usually inherited permissions, it's easy one just sets the permissions of the parent directory, and hey presto any child objects are the same, regardless of owner etc! So my question is, how can I simply set the permission of the root of the share so that all the files have +r +w permissions for all users regardless of the file owner? (I know this is a little crass from a security perspective, but I am assuming a friendly network)

In addition to the above problem, it seems that Fedora (11) clients with SELinux enabled have an issue with writing to directories that they are not the owner of, now i'm even less familiar with SELinux rules than *nix permissions! Is there a way to add a rule / exception for this, other than just switching SELinux off?

I'm finding Linux permissions a bit of a ball ache! Please help me!:cool:

Edit:

I understand that inherited permissions are to do with umask settings, but there isn't even a "man page" for umask, and it seems to have a different octal numbering system which has me confused, most documentation is er, dry shall we say, and doesn't seem to give simple concise explanations or examples... I have googled etc. but can't find much al that helpful
 
Last edited:
I've got in mind that there's a parameter you can set in samba to automatically set the permissions...

"create mask = 0777" springs to mind, but I might well be wrong.
 
Hello,

My smb.conf has both "create mask = 0777" and "directory mask = 0777" but it doesn't seem to help, I'm looking into what Aldo suggested, as it seems to be an (irritating) client side problem relating to SELinux!
 
Back
Top Bottom