How do I set permissions to Samba shares?
What is samba?
Samba is essentially a TCP/IP file and print server for Microsoft Windows clients. In fact, it can support any SMB/CIFS-enabled client. One of Samba’s big strengths is that you can use it to blend your mix of Windows and Linux machines
together without requiring a separate Windows server. Samba includes support for Active Directory, unicode, new authentication and filename mangling systems, printing support, trust relationships, LDAP integration and loadable RPC modules.
How do I set permissions to Samba shares?
Samba Basic permissions are as follows (configuration file is smb.conf [/etc/samba/smb.conf]):
- read only: This parameter controls whether an user has the ability to create or modify files within a share. This is default.
- guest ok: Uf this parameter is set to yes, the users will have access to the share without having to enter a password. This can pose security risk.
- writeable: Specifies users should have write access to the share.
You can create the share called secretfiles with read only permission
path = /usr/share/docs
read only = Yes
You can create the share called unixmendoc with write permission
path = /home/shared/unixmendocs
writeable = Yes
You can also create a list of users to give write access to the share with write list option. For example allow vlademir and unixmen to write to the share called goldoc:
path = /home/shared/goldoc
write list = vlademir unixmen
You can create a list of users to give read access to the share with read list option, , for example the folder name is “myfolder“, and the persons names names are unixmen and vlademir.
path = /home/shared/myfolder
read list = unixmen vlademir
You can use following options
read list: This option accepts a list of usernames or a group as its value. Users will be given read-only access to the share.
valid users: You can make a share available to specific users. Usernames or group names can be passed on as its value.
invalid users: Users or groups listed will be denied access to this share.
Samba mask permission
It is also possible to specify samba default file creation permission using mask.
- create mask: This option is set using an octal value when setting permissions for files.
- directory mask: Directories must have the execute bit for proper access. Default parameter is 0755.
path = /home/shared/sales
write list = rocky sys
create mask = 0775
And is done !
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Setup DNS Server On openSUSE 13.1 : What is DNS Server? As you might know, DNS, Domain Name System, is a system that resolves Domain ...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...1 comment |
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint : Tor, The Onion Router, is a network of Virtual Tunnels that allows users to communicate securely and...1 comment |
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update : Canonical has released security updates for Ubuntu 12.04 LTS and advices to update your system as so...0 comments |
- Setup DNS Server On openSUSE 13.1
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
- Selene Media Encoder: Convert Audio, Video Files To Most Popular Formats
- Linux Kernel 3.12.2 Is Available For Download! Install / Upgrade Instructions
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .