What is the difference between create mask and directory mask




















I need to create some solid boundaries and fully understand what makes those boundaries effective, or not. Thanks for your time and patience.

One thing to remember about Samba, it cannot override the underlying permissions set on the file system. To be able to control file permissions with Samba, you need to be sure the underlying file system file permissions support it. By default in Linux, when a user creates a file, the user and the group the user belongs to owns the file.

The permissions placed on the file are determined by the umask setting, which by default is usually Samba cannot override this so when a user creates a file from a remote workstation, the same thing happens. However, if all others don't have any rights to the directory at the file level, they won't be able to access the files from Samba. To be able to list the contents of a directory or access the files, you must have the execute permission on that directory. By setting the directory mask to , you remove the execute permission from the directory when it is created.

Noone will be able to do anything in that directory except root. If you need to have a group of users create files in a directory and then have anyone in the group edit any of the files, you need to control it at the file level.

Follow these steps: 1. That makes it so that when a user creates a file in the directory, the user owns it but the group that owns the directory is the group that owns the file. If you don't want anyone other than the group to be able to read the files, then use so all others will have no access to the directory. Share the directory out with Samba. For added security, allow only that group to access the share. Set the Samba create mask to if you don't want all others to have any permissions to the files.

I've used this in a multi-user situation before and it works. When a user creates a file, he owns it and the group that owns the parent directory is the group owner of the file. Any member of the group can then edit the file. Set the Samba directory mask to or That way it will have the same permissions as the original Samba directory and any files created in it can be edited by anyone in the group.

When you look at the file permissions in XP, they should look OK. However, if you mount the share from a Linux machine, the permissions may not appear correct if you look at them on the client machine. If you look at the file permissions on the Samba server, they will be correct.

Wow, thanks for the thoughtful response. This is good stuff, and perty dern organized too. From the beginning, I did groupadd, and then when I created the users, I made them members of the new group and no others.

I'm still a little stuck regarding the first digit in the octal designation. I understand what the last 3 digits control, but I still can't get a handle on what the first digit controls. What does the "2" do in your "" permission setup. For regular files non-executables , the requested mode is without the x executable bit, i.

Of course, you can always change these modes with for example the chmod command, for which the umask will not be considered in editing. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Mask vs. Mode - Permissions Ask Question. Asked 8 years, 2 months ago. The time now is AM.

Twitter: linuxquestions. Open Source Consulting Domain Registration. Search Blogs. Mark Forums Read. User Name. Remember Me? 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. View Public Profile. View Review Entries. I applied what I found and the issue I had appeared resolved after a reasonable wedge of testing. At the end of the day that was now a long time ago, so I can't really contend anything as I usually solve problems, bookmark what I did or document it otherwise and move on.

So I don't remember the details anymore, just that I was banging my head against the wall until I ran man samba.

Anyway, I'm glad to hear you resolved your problem too. October 7th, Join Date Mar Beans 1. In the manual it explicit says that these extensions are of no current use to Windows clients.

So it shouldn't matter what you set this to. What may actually help which it did for me is to validate the smb. Page 1 of 2 1 2 Last Jump to page:. Tags for this Thread samba , samba permissions group.



0コメント

  • 1000 / 1000