LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2018, 04:10 AM   #1
rintsp
LQ Newbie
 
Registered: Jul 2018
Posts: 2

Rep: Reputation: Disabled
Samba - Permission Denied


Hello

I am relatively new to Linux and am struggling to get a SMB share up and running between two Linux boxes.

I have two Linux boxes (A and B), both running the same fully patched versions of RedHat 6.9

Both have Samba installed, Box A acts as a file server to Box B

On box A I have configured a Samba share on a directory called test101, if I then go to box B and issue a smbclient -L X.X.X.X I can see the share, I am then also able to mount the share on box B which all works fine.

The issue is that when I access the directory on box B where the share has been mounted and simply run “ls” I receive a message “ls: reading directory: permission denied”.

The /etc/samba/smb.conf has these entries:

[test101]
comment = test101
path = /test101
read only = no

I have run smbpasswd and have set up the root account on Box A (I have also tried a specific new user with no different outcome)

On box A the directory /test101 has rwxr.xr.x

The mount successfully works on box B and that is also showing permissions of rwxr.xr.x – (mount -t cifs -o user=root,password=xxxxxxx //<Box IP Address>/test101 /test101)

In this test I am using the root account on both machines – I have also tried setting up a new user and that fails in the same manner.

I am quite confused as to what the issue is – any thoughts?

Long story – but I cannot use NFS in this situation, hence the use of Samba
 
Old 07-12-2018, 11:37 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Welcome to LinuxQuestions.

My first guess is the permission error is due to selinux. The notes at the top of the smb.conf file should contain sufficient information to add your share directory. If you have fully patched versions of RHEL then I assume you have a paid subscription and can call them for specific help?
 
Old 07-12-2018, 07:15 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
SAMBA is a windows compatibility module - you will be forcing a minimum of two access translations - one on the client one on the server. Windows is not exactly one-to-one in conversions. Specially with user identities.

You may even be running into an anonymous identity not being permitted to access anything.

For Linux to Linux, you have an easier time with NFS.

Since you haven't included which distribution, SELinux (which would be Fedora/CentOS/SL/RH distributions) can block all access UNLESS it is directed to permit SAMBA.
 
Old 07-12-2018, 07:21 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
FYI
Quote:
I have two Linux boxes (A and B), both running the same fully patched versions of RedHat 6.9
 
Old 07-13-2018, 12:59 AM   #5
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 420
Blog Entries: 1

Rep: Reputation: 202Reputation: 202Reputation: 202
Quote:
The issue is that when I access the directory on box B where the share has been mounted and simply run “ls” I receive a message “ls: reading directory: permission denied”.
I see that you have mounted the samba share with root's credential on the client machine. Any chance you are trying to access/view the share as a normal user?

Also, you could try switching to a multiuser samba setup and see if the issue resolves. You'll need a few users (samba users) at the minimum.
 
Old 07-20-2018, 05:52 AM   #6
rintsp
LQ Newbie
 
Registered: Jul 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you all for responding - the answer was indeed selinux permissions :-)
 
  


Reply



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
Permission denied on a samba share spangler Linux - Server 10 09-22-2017 02:23 PM
samba share permission denied mendrika.andrianina Linux - Newbie 1 01-05-2017 02:55 PM
Samba, permission denied error. BashTin Linux - Server 8 07-15-2008 03:44 AM
samba drive permission denied yusufs Linux - General 6 12-29-2007 12:48 AM
Samba Permission Denied Adairen Linux - Software 6 12-11-2006 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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