So lets re-collect some important points about samba and its permissions…. quickly.
Always Remember that:
1. Your file / folder system permission will take precedence over Samba permissions. That means that if you have created a directory that doesn’t have “w” (write) permission over it then passing “writeable = YES ” in /etc/samba/smb.conf file will do no good.
2. Similarly, the filesystem permission (generally used in /etc/fstab, to mount a filesystem) will take priority over Samba permission. That simple means that if your have mounted a filesystem as “readonly” then passing “writeable = YES ” will again do no good.
The crux of the tip is that:
Limits / Restrictions set by kernel-level access control like file permissions, mount options under /etc/fstab, ACLs, and SELinux policies cannot be overridden by Samba. So the Samba looks at the Kernel to finally allow that parameter mentioned in /etc/samba/smb.conf file.
Just remember some of these basic Samba permissions.
read only: Simple, specify that this share is “read only”. The default option.
guest ok: Anyone can access that share, without even prompted for password. Can be useful for public shares, but can be a threat. So be careful.
writeable: Specifies users should have write access to the share. Then we can also create a write list to mention which specific users are allowed to access the samba share. Like you can give “write list = alok aryan” to allow only alok and aryan user to have write access.
read list: Similar to write list this option will only provide read only access to listed users.
valid users: The samba share is available to specific users only.
invalid users: As the name says the names appearing here are not allowed to access the samba share.
So Geeks !!! Always remember these basics before configuring samba.