LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2006, 06:07 AM   #1
Harriskaver
LQ Newbie
 
Registered: Mar 2005
Location: Birmingham, UK
Distribution: Fedora Core 5
Posts: 25

Rep: Reputation: 15
Samba Access Denied


I've setup samba on FC5 and I want to run it on my network as a file server. I've set everything up as it should be and I can see the server, the shared folders and the files in them on a Windows XP machine. My problem is that, unless I set the shared folder to the /tmp folder, I can't create new files/folders or edit/rename files/folders in the directory. I've tried all the different configurations I could find but the only thing that works for me is setting the directory to /tmp.

This is my current config for my shared folder. /testfolder has its permissions set to 777.
[daniel]
comment = Daniel's Files
path = /testfolder
guest ok = yes
read only = no
public = yes
writable = yes
printable = no
browseable = yes
create mask = 0777

Does anyone know what I'm doing wrong? Has anyone else had this problem?
 
Old 05-06-2006, 08:06 AM   #2
Glennzo
Member
 
Registered: May 2003
Location: Salem, Mass USA
Distribution: Fedora
Posts: 394

Rep: Reputation: 52
Try adding a user account on the windows machine to match the account on the Fedora machine. Then try to create the folders.
 
Old 05-06-2006, 09:05 AM   #3
shorun
Member
 
Registered: Mar 2006
Location: belguim
Distribution: fedora, mandriva, suse
Posts: 148

Rep: Reputation: 15
Quote:
I've setup samba on FC5 and I want to run it on my network as a file server
please use FTP for this. if you want to make a fileserver it might be usefull to have a file transfer protocol server instead of a "samba windows filesharing server".

you will find ftp to be more stable/easy to set up then samba.
 
Old 05-06-2006, 10:53 AM   #4
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Try this, it's a better way to share files.
Add a new local user to your system
Code:
mkdir /home/daniel
useradd daniel -d /home/daniel -s /bin/bash
chown daniel:root -R /home/daniel/
chmod -cR 0755 /home/daniel/
create a local password for daniel
Code:
passwd daniel
create a samba password for daniel
Code:
smbpasswd -a daniel
Now, in your /etc/samba/smb.conf file, make following changes
Code:
security = share
Add following lines to the same file
Code:
[daniel]
   comment = daniel's folder
   path = /home/daniel
   writable = yes
   public = no
   valid users = daniel
   create mask = 0755
Run testparm to see if you have configured smb.conf file correctly
Code:
testparm
If everything looks fine, restart samba by using
Code:
/sbin/service smb restart
or
Code:
/etc/init.d/rc.d/smb restart
Now you can access your shared folder from any computer on your local network by using the samba password.
Please let me know if it does / doesn't work.

Last edited by manishsingh4u; 05-06-2006 at 10:56 AM.
 
Old 05-06-2006, 01:46 PM   #5
Harriskaver
LQ Newbie
 
Registered: Mar 2005
Location: Birmingham, UK
Distribution: Fedora Core 5
Posts: 25

Original Poster
Rep: Reputation: 15
I tried following the steps you suggested but now when I try to view the folder in Windows XP I get:
"\\Server\daniel is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

The network name cannot be found."

Also, on linux this error keeps coming up:
"audit(1146940719.872:61): avc: denied { search } for pid=2545 comm="smbd" name="home" dev=hda1 ino=7110657 scontext=root:system_r:smbd_t:s0 tcontext=system_ubject_r:home_root_t:s0 tclass=dir"

Edit:
I've searched around a bit for information about this error and it seems SELinux is what is causing it. I tried disabling SELinux and samba worked perfectly! Is there any way to keep SELinux running but have samba working as well?

Last edited by Harriskaver; 05-06-2006 at 02:24 PM.
 
Old 05-06-2006, 11:38 PM   #6
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by Harriskaver
\\Server\daniel is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
The network name cannot be found."
Please check this thread. I hope it will help you.
http://www.linuxquestions.org/questi...d.php?t=223649
I get the same error sometimes and even I am working on it right now.

Last edited by manishsingh4u; 05-07-2006 at 12:32 AM.
 
Old 05-07-2006, 01:32 AM   #7
Harriskaver
LQ Newbie
 
Registered: Mar 2005
Location: Birmingham, UK
Distribution: Fedora Core 5
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by manishsingh4u
Please check this thread. I hope it will help you.
http://www.linuxquestions.org/questi...d.php?t=223649
I'm having a completely different problem to what that thread talks about. It is about getting samba to work with iptables rather than SELinux.
 
Old 05-07-2006, 01:43 AM   #8
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Sorry Harriskaver, but, I didn't give you that link for SELinux and samba. I gave you that link in response to
Quote:
\\Server\daniel is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
I have no ideas about SELinux problem.
 
  


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/swat access denied bob_man_uk Linux - Software 2 10-19-2005 03:12 AM
Samba - access denied on windows suco Linux - Software 6 09-26-2005 10:30 PM
Samba - Access denied aikempshall Linux - Networking 22 08-24-2004 06:50 AM
Access denied XP samba shares djtsa Linux - Software 0 10-02-2003 06:26 AM
windows xp and samba access denied eradiate Linux - Networking 4 06-01-2003 09:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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