mount error 13 = Permission denied driving me insane

General support questions including new installations
neuronetv
Posts: 71
Joined: 2012/01/08 21:53:07

mount error 13 = Permission denied driving me insane

Postby neuronetv » 2014/09/13 18:11:33

I have a samba share set ip on a centos 5 machine, 32bit, it works fine and has been working fine for two years. My other machines (centos 6/MS Windows) have no problem connecting to it and accessing it.
All my linux machines can connect to this share using this command:
mount -t cifs -o username=<user>,password=<password> //centos5-ip-address/share /media/centos5-share

I've just built up a centos 5.10 64 bit server and I cannot mount this share, using the above command I get:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I've disabled selinux and rebooted, I've been trawling google for ages and nothing works. I looked at the mount.cifs manual and I saw:
BUGS
Mounting using the CIFS URL specification is currently not supported.

eh? I have several samba shares on my network and the 64bit machine has no problem connecting to them with '-t cifs'. if it won't take '-t cifs' what is the correct substitute? I've tried so many different things in this command but it will not work, and yet other machines connect to the share with no problem.
so what's solution here? thanks for any help....

User avatar
TrevorH
Forum Moderator
Posts: 20596
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mount error 13 = Permission denied driving me insane

Postby TrevorH » 2014/09/13 20:14:16

I would think that a CIFS url would be like cifs://

I'd suggest cranking up the log level on client and server and checking those to see if you can see what the problem is. Mount ing CIFS shares from a CentOS 5.10 machine definitely does work since I am doing it. I'm using the autofs method detailed in the wiki but it should not differ much and I specify this in my /etc/auto.cifs file -fstype=cifs,rw,noperm,credentials=/etc/userpass
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

neuronetv
Posts: 71
Joined: 2012/01/08 21:53:07

Re: mount error 13 = Permission denied driving me insane

Postby neuronetv » 2014/09/13 20:19:45

thanks if it works for you I'd like to duplicate the way you've done it, could you give details of the command you used to mount and how the /etc/userpass file fits to it?

User avatar
TrevorH
Forum Moderator
Posts: 20596
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mount error 13 = Permission denied driving me insane

Postby TrevorH » 2014/09/13 21:31:58

I use autofs to mount my drives so I have an /etc/auto.master file containing

Code: Select all

/mnt/cifs       /etc/auto.cifs --timeout=120 --ghost


and then in /etc/auto.cifs I have

Code: Select all

S       -fstype=cifs,rw,noperm,credentials=/etc/userpass ://10.1.1.1/Share


then finally in /etc/userpass I have my user credentials like so

Code: Select all

username=myuser
password=mypass


This last file is chmod 600 and root:root.

Using this, when I reference /mnt/cifs/S/ then autofs mounts the share for me using my credentials from the file and once it's mounted then the command that referenced it is allowed to run. Two minutes (120s) after it's last referenced then autofs will umount it for me. I use S because my colleagues on windows mount the same share on S:.

However if mount -t cifs -o noperm,username=username,password=password //10.1.1.1/Share /mnt/cifs/S doesn't work then neither will autofs so it might be better to fix that first.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke