LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2014, 04:42 AM   #1
tonytj
LQ Newbie
 
Registered: Oct 2014
Posts: 3

Rep: Reputation: Disabled
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

Last edited by tonytj; 10-31-2014 at 05:27 AM. Reason: Found the solution
 
Old 10-31-2014, 06:49 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,613
Blog Entries: 12

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
Quote:
Originally Posted by tonytj View Post
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.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to change ACL mask to r-x for files to be created in directory faitrien Linux - Security 4 02-26-2014 06:08 AM
HELP! Cant change file permissions for files created in Windows XP on 2nd hard drive! jsd222 Linux - Newbie 3 01-17-2013 09:13 PM
Change memory protection andparker Linux - Kernel 4 06-08-2011 11:18 AM
Protection in openoffice spreadsheet created .xls files PClOStinspace Linux - Software 2 06-06-2009 12:13 PM
Unable to Change File/Directory Protection. rvijay Linux - Newbie 2 09-15-2003 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:25 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration