LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2013, 02:59 PM   #1
t4e
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Rep: Reputation: Disabled
Samba Share permission problems


Hi (I'n new here), and I have the following problem:
Two computers (both run gnu/linux), the "client" computer has a user "bob", the "server" has a user named "tom". On the server, there should be a samba share that both, bob and tom can access. What's important to me is that when "bob" does something with the share he should do it with the exact same permissions that tom has on that directory. is that possible? if yes, how? if no, what else can I do besides force samba to create everything with 777 permissions, that still results in both tom and bob being able to access the files?


On the SERVER I did:
sudo smbpasswd -a tom (and then I set the password)
I created a samba share, with a smb.config file like this:

[global]
workgroup = WORKGROUP
security = User
allow guests = No


[library]
path=/media/usb3tb
valid users = tom
read only = no
writeable = yes
force user = tom

I mounted the share (on the client machine) like this:
//10.0.0.7/library /mnt/Share cifs username=tom,password=XXXX,uid=tom's uid,gid=tom's gid0 0


I can see all the files, but when I create something I get a "permission denied" error, and see that the created file has 0 bytes and has been created with the umask of tom - so I can't do anything with it. What I want is being able to do things "In tom's name". Does samba let me do this somehow and if not what would you suggest that's quick and doesn't involve 777?

Thanks in advance,
simon
 
Old 12-04-2013, 01:41 PM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Does tom actually have permission to write to /media/usb3tb?
Also if you wanted to make tom and bob the same do it by group.
 
Old 12-05-2013, 03:46 AM   #3
wstewart90
Member
 
Registered: May 2013
Distribution: Arch Linux
Posts: 86

Rep: Reputation: Disabled
Check the selinux log files and if selinux turns out to be the problem then you can either turn it off with

Code:
setenforce 0 && sed -i 's/\(SELINUX=\)enforcing/\1permissive/' /etc/selinux/config
or change the context of /media/usb3tb with

Code:
 chcon -t samba_share_t /media/usb3tb
Also make sure that tom is a user that has write permissions to the file (e.g., file owner or a member of group.)

Last edited by wstewart90; 12-05-2013 at 03:47 AM.
 
Old 12-05-2013, 05:54 AM   #4
PeterSullivan
LQ Newbie
 
Registered: Aug 2013
Posts: 29

Rep: Reputation: Disabled
Quote:
Originally Posted by wstewart90 View Post
Check the selinux log files and if selinux turns out to be the problem then you can either turn it off with

Code:
setenforce 0 && sed -i 's/\(SELINUX=\)enforcing/\1permissive/' /etc/selinux/config
or change the context of /media/usb3tb with

Code:
 chcon -t samba_share_t /media/usb3tb
Also make sure that tom is a user that has write permissions to the file (e.g., file owner or a member of group.)
I think the tom do not have sufficient permission to create and file or edit.
 
1 members found this post helpful.
Old 12-13-2013, 05:34 AM   #5
t4e
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks guys, I solved the problem. I needed to create the user on the server as well, of course.
 
  


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
Samba Share Server Permission Help carlosinfl Linux - Server 6 07-16-2008 07:01 AM
Samba Printer Share = no permission SlowCoder Linux - Newbie 7 07-09-2007 08:23 PM
Samba - dont have permission to browse samba share. Scrag Linux - Software 4 11-28-2006 01:42 AM
Can't get RW permission on a mounted samba share darkangel12613 Linux - Software 6 08-31-2006 07:04 AM
Samba share permission issue cbekannan Linux - Security 4 03-11-2005 03:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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