LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I change so I get the right protection on created files (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-change-so-i-get-the-right-protection-on-created-files-4175523878/)

tonytj 10-31-2014 05:42 AM

How do I change so I get the right protection on created files
 
I use Samba to create files from Windows but I get wrong protection

When I create a file in a fileshare from Windows I get this protection 744. I want to have 700 because the file should not be allowed to read by any group or other.

I use default smb.conf except this

I think I solved it by using this configuration

[mnt]
comment = only valid for the boss
path = /mnt
public = no
guest ok = no
writeable = yes
browseable = yes
valid users = tony
host allow = 192.168.1.110
create mask = 0700
directory mask = 0700


//Tony

rtmistler 10-31-2014 07:49 AM

Quote:

Originally Posted by tonytj (Post 5262311)
I use Samba to create files from Windows but I get wrong protection

When I create a file in a fileshare from Windows I get this protection 744. I want to have 700 because the file should not be allowed to read by any group or other.

I use default smb.conf except this

I think I solved it by using this configuration

[mnt]
comment = only valid for the boss
path = /mnt
public = no
guest ok = no
writeable = yes
browseable = yes
valid users = tony
host allow = 192.168.1.110
create mask = 0700
directory mask = 0700


//Tony

That will do what you intend. I'm guessing that you're inquiring if there are other techniques to do this, or if there are better choices. My opinion is that while there may be other techniques, this one is fine and I would choose to use it for my configuration if I were configuring for a similar problem.

What I'm not so keen on is the "host allow" line, because host addresses can be different if they are DHCP assigned.


All times are GMT -5. The time now is 11:31 AM.