• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

Samba Access Problems

I'm trying to set up Samba and am having access issues.

I can only share directories in /usr and /tmp; i.e I cannot share my home directory. That is if I create a share for /home/tom    then if I try to access /home/tom on a windows machine I get access denied.

So I created a directory /usr/data  and I share this. This directory is visible on Windows but I cannot write to this directory; I get an access denied issue.

My samba server is Fedora 11. I've tried windows XP and Vista Clients. I've tried mounting it on linux and have the same issues.

0
jlewi2009
Asked:
jlewi2009
  • 6
  • 3
  • 3
1 Solution
 
nabeelmoiduCommented:
can u post smb.conf
and the file permissions on the exported directories?
0
 
jlewi2009Author Commented:
I'm attaching my smb.con file.
The share I'm trying to export is /usr/onenote
I've played around with a bunch of different settings hence the comments

The file permissions on /usr/onenote are
drwxrwxr-x.

I have tried recursively giving read/write/execute access to everyone.
smb.conf.txt
0
 
OOsorioCommented:
In the smb.conf, at the end of the file for example, you should create the share information. Something that looks like this:
[onenote]
   path = /usr/onenote
   valid users = tom dick harry nobody
   public = yes
   writable = yes
   printable = no
   create mask = 0777

Stop and start the Samba service.
Try it and let us know....
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
jlewi2009Author Commented:
I followed OOsorio's instructions (see attached smb.conf file) and got the same response; i.e access denied when trying to write.
smb.conf.txt
0
 
jlewi2009Author Commented:
Should it be writeable or writable?
I tried both and neither seemed to work.

When I run testparm here's what I get

[onenote]
      comment = samba test share
      path = /usr/onenote
      valid users = jlewi, nobody
      read only = No
      create mask = 0777

Does it make sense that it is not showing the writeable and public attributes as being set?
0
 
OOsorioCommented:
Yes. Try changing the permission settings of the folder to 777 as well and test.
0
 
OOsorioCommented:
I believe it's writable.
0
 
jlewi2009Author Commented:
I tried that but its still not working
0
 
nabeelmoiduCommented:
you probably have selinux enabled
post
/etc/sysconfig/selinux
and
/selinux/enforce

0
 
jlewi2009Author Commented:
I disabled selinux and rebooted. It appears to be working now. Is there a proper way to configure selinux without disabling it?

What exactly is selinux?
0
 
nabeelmoiduCommented:
SHARING HOME DIRECTORIES
       By  default  SELinux  policy  turns  off  SELinux  sharing  of  home  directories  If  you  are  setting  up  this  machine  as  a  Samba  server  and wish to share the home directories, you need to set the        samba_enable_home_dirs boolean.

       # setsebool -P samba_enable_home_dirs 1


USING CIFS/SAMBA HOME DIRECTORIES
       Samba  SELinux  policy will not allow any confined applications to access remote samba shares mounted on your machine.  If you want to use a remote Samba server for the home directories on this machine, you must set the use_samba_home_dirs boolean.

       # setsebool -P use_samba_home_dirs 1



selinux is an extra security layer thats implemented to prevent one service from affecting the system as a whole when compromised. Like say if a cracker breaks into the web server , the worst he can do in an selinux system is play with the files and folders in the http document root. he can't touch a home directory etc
0
 
jlewi2009Author Commented:
I didn't actually try to configure SeLinux; instead I just disabled. When I have time I will try to configure selinux properly.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now