Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.