How to create full right permission on Samba share

Posted by Planet Malaysia on October 17, 2008

advertisement

Samba is an Open Source/Free Software suite that has, since 1992, provided file and print services to all manner of SMB/CIFS clients, including the numerous versions of Microsoft Windows operating systems. Samba is freely available under the GNU General Public License.

Samba comes with different types of permissions for share and for some reason you may require creating new files and directory with full right permission 777.

The example show as below will guide you how to configure Samba share drive with 777 full right permission for any new files or folders created in /data/shared(example)?

[SHARED]
comment = SHARED data
path = /data/shared
valid users = user1, user2, planetmy
writeable = yes
create mask = 0777
force create mode = 0777
directory mask = 777

max connections = 10
veto files = .??*/.ssh/.profile/.mailrc

In this case, the most important Samba setting are:

create mask = when a new file created, the necessary UNIX mode permissions are created and the default create mask = 0744

force create mode = specifies a set of UNIX mode bit permissions that will always be set on a file created by Samba.

directory mask = when a new directory created, the necessary UNIX mode permissions are created and the default create mask = 0755

Additional setting:

valid users = a list of users that should be allowed to login to this service.

max connections = number of simultaneous connections to a service to be limited

veto files = a list of files and directories that are neither visible nor accessible

writeable = this parameter is a synonym for writeable

Enjoy 777 permission for any new file or directory create in /data/shared folder!

Possibly Related Posts:


Comments

One Response to “How to create full right permission on Samba share”

  1. barbara trash on March 12th, 2009 6:48 pm

    If you want to connect windows clients to
    your servers be careful setting file perms to 0777!
    use 666, when you want your files be globally writable.

    The executable bit has some special meanings in the windows-world.
    Also check the samba manpage for meanings of the map hidden/archive/system flags enabled/disabled.

    Directorys can/must have the executable bits.

    See this link for reference :
    http://oreilly.com/catalog/samba/chapter/book/ch05_03.html

Leave a Reply




Planet Malaysia

  • Follow us on Twitter


  • web www.planetmy.com