LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-15-2009, 11:54 AM   #1
fachamix
Member
 
Registered: Oct 2009
Posts: 122

Rep: Reputation: 16
Samba - create mask problem


I have a share in my server named [example]

in [global] I have:
guest account = nobody
guest ok = yes
guest only = no
read only = no


my shared resource named "example" is defined like this:

[example]
path = /home/user/shared
comment = my shared resource
browseable = yes
read only = no
writable = yes
guest ok = yes
guest only = no
create mask = 0777
directory mask = 0777


I have a problem .... when a guest user creates a file in "example" , its does NOT get 0777 permision.
What I want is that when a guest user creates a file or directory in the "example" share, the file or directory to have ALL PERSMISIONS FOR EVERYBODY ,,.... like this "a+rwx"

Maybe my mistake is that I am not understanding something.
I believe that create mask = 0777 would do the "chmod a+rwx file/dir" , maybe not ................ HELP!!!!!!!!!!!!!!!!!

Last edited by fachamix; 11-15-2009 at 01:16 PM. Reason: bad title
 
Old 11-15-2009, 09:24 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Try "force create mask"

jlinkels
 
Old 11-15-2009, 10:37 PM   #3
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
I also faced same problem few days back. After investigation i concluded that ' create mask ' parameter also care whats you ' umask ' permission settings. If you want to avoid 'umask ' value thenm ' force create mode ' will be right choice .

force create mode = 777

thnks
 
Old 11-16-2009, 08:42 AM   #4
fachamix
Member
 
Registered: Oct 2009
Posts: 122

Original Poster
Rep: Reputation: 16
I will try the force create mode or force create mask and after that I will tell you people.

whats the umask ?????? I am newbie ???? (umask is the LINUX permision for a directory/file ?)
 
Old 11-16-2009, 09:20 AM   #5
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Quote:
Originally Posted by fachamix View Post
I will try the force create mode or force create mask and after that I will tell you people.

whats the umask ?????? I am newbie ???? (umask is the LINUX permision for a directory/file ?)
Suppose you are creating a file or directory what permission get applied on that? 'umask determine that' suppose your umask value is 022 , then when you create a new folder the permission on that will be 755(drwxr-xr-x). i mean 777-022=755. You can check umask value using umask
command, and you can also change that value. For more help type man umask on your system

thanks
 
Old 11-16-2009, 04:13 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Mind you, this is the LINUX create mask, which is the inverse of what you want.

Say you want to create files with 644, then your umask becomes 777-644=133.

However, SAMBA uses non-inverted umasks, so 777 is "all permissions to everyone' which would be Linux umask = 000.

jlinkels
 
Old 11-16-2009, 09:33 PM   #7
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
I was also talking about linux umask i mean 'man umask'(nothing about create mask). I just want to say set create mask depend on what is umask value in linux permission.
'force create mode =777' in smb.conf share section will surely done his job. No need to alter any value in mask parameters.

Thanks

Last edited by vishesh; 11-16-2009 at 09:36 PM.
 
  


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
How to edit files with xemacs over Samba share? Samba problem? rylan76 Linux - Software 1 11-13-2008 01:00 AM
Problem in Samba on Linux about locking the files neel.gurjar Linux - Server 1 04-16-2008 02:47 AM
problem accessing files using samba vineet7kumar Linux - Software 1 08-13-2007 02:00 PM
problem sharing files with samba d_kilshtein Linux - Networking 1 01-30-2006 03:41 AM
Problem sending files to a Samba Printer mpls2000 Linux - General 0 08-22-2003 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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