LinuxQuestions.org
Visit Jeremy's Blog.
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 06-11-2019, 09:25 AM   #1
bbraml
LQ Newbie
 
Registered: Sep 2011
Posts: 17

Rep: Reputation: Disabled
cifs mount error(13) permission denied on client


I have attempted to set up a cifs share from one linux box to another using RHEL 7.

Config:
[samba]
path = /some_share
browseable = yes
writable = no
write list = user1,user2

enabled and started smb & nmb, added users to smbpasswd, added samba firewall via firewall-cmd, added selinux context to the directory.

On the client:
I installed cifs-utils, created a mount point, tried to mount it via the command line: mount //server1/samba /mnt -o username=user1
it asks for the smbpassword, i enter it and get the mount error 13.

So i thought it may be the firewall on the server. I stopped firewalld and tried again. same error 13.
Thought it may be related to selinux, stopped selinux and tried again. same error 13.

anyone have any ideas?
 
Old 06-11-2019, 12:02 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,719
Blog Entries: 15

Rep: Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601
If both systems are Linux why use CIFS instead of NFS?
 
Old 06-11-2019, 12:36 PM   #3
bbraml
LQ Newbie
 
Registered: Sep 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
testing, studying purposes.
 
Old 06-11-2019, 02:45 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,719
Blog Entries: 15

Rep: Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601
You listed your command as:
Code:
mount //server1/samba /mnt -o username=user1
That is slightly off what I've done in the past - maybe order of options is your issue. What if you try:
Code:
mount -t cifs -o username=user1,password=<password> //server1/samba /mnt
Note that you can put the actual password on the command line indicated above to avoid it prompting for one.
 
Old 06-11-2019, 09:22 PM   #5
bbraml
LQ Newbie
 
Registered: Sep 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
I did that too with the same results. it's driving me crazy!!!
 
Old 06-12-2019, 09:58 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,719
Blog Entries: 15

Rep: Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601Reputation: 1601
I just did some testing and found that the mount on the client side is the subdirectory on the server side.

That is to say if /some_share on the server is /samba/anonymous then on the client I have to tell it to mount anonymous rather than samba/anonymous.
 
Old 06-12-2019, 10:06 AM   #7
bbraml
LQ Newbie
 
Registered: Sep 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
I'm not sure what you're doing here.
The config doesn't have a sub-directory. It's just /some_share
 
Old 06-12-2019, 10:25 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,588

Rep: Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698
Are both the client and server running RHEL 7?

I assume that user1 is an existing user on the server and has read/write permissions to /some_share?
 
Old 06-12-2019, 10:33 AM   #9
bbraml
LQ Newbie
 
Registered: Sep 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
yes RHEL 7 on both servers. user1 is created on the samba server and has read/write
 
Old 06-12-2019, 10:43 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,588

Rep: Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698Reputation: 2698
I'm running CentOS 7 but I would expect the same versions/behavior as RHEL. Are you using a hostname or IP address? If using a hostname try the IP address.

Also try accessing the share using the smbclient command.

smbclient //server1/share_name -U user1

Basically smbclient is acting as a ftp client.
 
Old 06-12-2019, 11:48 AM   #11
bbraml
LQ Newbie
 
Registered: Sep 2011
Posts: 17

Original Poster
Rep: Reputation: Disabled
Using hostname. tried ip, tried smbclient too. same issue.
 
  


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
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 44 02-26-2016 12:45 PM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM

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

All times are GMT -5. The time now is 04:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration