- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Samba share access - need clarification
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 06:28 AM
тАО04-20-2009 06:28 AM
Samba share access - need clarification
I have one samba share which is given with below access level in smb.conf
[backup]
comment = Unix share BACKUP
path = /backup
valid users = user1
public = no
writable = yes
browsable = yes
printable = no
create mask = 0755
At unix level, see the permissions..
#bdf
/dev/backup/lvol1 744194048 550112808 192565576 74% /backup
#ll -d /backup
drwxrwxr-x 29 sql dba 8192 Apr 20 14:12 /backup
At unix level this mount point is owned by sql:dba
#id user1
uid=1106(user1) gid=20(users)
At unix level user1 is not having write access to the mount point /backup.
As per my understanding, user should be able to write on the samba share /backup since we have given "writable = yes" in smb.conf file
But i am able to browse but not able to write/delete anything through samba.
If I change user1 group membership to dba, i am able to write/delete. Why is it so?
I think, unix permissions are irrelevant to samba. am I wrong or missing something?
Hope to hear from you...
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 06:33 AM
тАО04-20-2009 06:33 AM
Re: Samba share access - need clarification
Change the mount point ownership.
sql:dba
That is why changing the group to dba works.
You can also use samba parameters to define group ownership of the share.
http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
http://www.docs.hp.com/en/B8725-90079/ch07s02.html
Second example may be better. But your configuration includes valid users but not a definition of group ownership.
I'd try tweaking smb.conf before the mount point but in the end I'd do both.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 06:53 AM
тАО04-20-2009 06:53 AM
Re: Samba share access - need clarification
Thanks for your reply SEB.
My questions is, unix permissions are relavant to samba access in any ways?
If yes, then why we need writable=yes or browsable=yes options? Access can be given purely based on unix permissions right..
It is my understanding only. It would be great if someone can clarify this..
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 07:06 AM
тАО04-20-2009 07:06 AM
Re: Samba share access - need clarification
I always thought and currently use Samba to share Unix filesystems to Windows and it's the Windows username where those tokens come into play. If user1 is on a Windows PC, they should be able to
The Unix permissions should be irrelevant to the share on Windows although I'm not 100% sure of that statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 07:10 AM
тАО04-20-2009 07:10 AM
Re: Samba share access - need clarification
If yes, then why we need writable=yes or browsable=yes options? Access can be given purely based on unix permissions right..
No.
If you set writable=no, and the directory has write privileges, users on the command line will be able to write but users using a samba client like windows will not be able to write.
If you are servicing samba clients you need to get the samba permissions right.
Directory permissions CAN interfere with samba clients. Best practice is to bring permissions, samba perms into sync to avoid unexpected results.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 07:13 AM
тАО04-20-2009 07:13 AM
Re: Samba share access - need clarification
We don't need the same user account on windows PC. We can select "different user name" option when we map the drive, if we don't have same samba user account in windows.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 08:00 AM
тАО04-20-2009 08:00 AM
Re: Samba share access - need clarification
Samba does let you override the user/group for filesystem activity with "force user" and "force group" in smb.conf, which would effectively negate the filesystem permissions in your situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2009 02:35 PM
тАО04-20-2009 02:35 PM
Re: Samba share access - need clarification
"valid users" and/or "writable = yes" are filters that Samba applies to regulate access based upon the *authenticated* user - the user name, *not* the UID. Most of those share-level access parameters are administered this way. Try it: give a shared directory 775 and in smb.conf give the share "writable = yes" - you cannot write. Samba can regulate the authenticated user access, but cannot overrule the UNIX permissions by UID.
"force user" is a different story, as are some other parms (pretty much anything force). "force user" just assigns the authenticated user the UID of whatever the "force user" user is. Since smbd runs as root, it can do this, but I think it's confusing and insecure. In any case, even "force user" does not override the file/directory permissions - it just switches the authenticated user's UID for access.
So for the most part, Samba can take away access based upon username, but cannot grant access that has been denied by UID.
Eric