n0c0d3
Posts: 6
Joined: Wed Jan 25, 2012 3:17 pm

CIFS Permission denied error

Tue Nov 12, 2013 1:32 pm

Hello,
anyone experiencing problems with CIFS after last rpi-update ? I've used CIFS mount several times before the last update.

Linux raspberrypi 3.10.18+ #590 Mon Nov 11 21:26:42 GMT 2013 armv6l GNU/Linux

The error is :

root@raspberrypi:/# mount -t cifs //192.168.0.3/USB1 temp_smb
Password:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Smbclient -L is on the other hand showing correctly all the shares in 192.168.0.3 (Emtec media player)

Appreciate your help!

Thanks,
Best regards
MAurizio

User avatar
Mortimer
Posts: 922
Joined: Sun Jun 10, 2012 3:57 pm

Re: CIFS Permission denied error

Tue Nov 12, 2013 1:40 pm

You'll need to use SUDO.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

n0c0d3
Posts: 6
Joined: Wed Jan 25, 2012 3:17 pm

Re: CIFS Permission denied error

Tue Nov 12, 2013 1:45 pm

Mortimer wrote:You'll need to use SUDO.
Hi,
i don't think that's the problem: maybe you should look at my message , i'm already running the command as root (noticeable by the # at the prompt).

Thanks anyway.
BR
Maurizio

User avatar
DougieLawson
Posts: 38810
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: CIFS Permission denied error

Tue Nov 12, 2013 2:17 pm

Is 192.168.0.3 listening?
Can you ping 192.168.0.3?

smb/cifs is crap at reporting the real error everything is reported as a security failure.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

n0c0d3
Posts: 6
Joined: Wed Jan 25, 2012 3:17 pm

Re: CIFS Permission denied error

Tue Nov 12, 2013 2:33 pm

Hi Dougie,
DougieLawson wrote:Is 192.168.0.3 listening?
yes
Can you ping 192.168.0.3?
yes

smb/cifs is crap at reporting the real error everything is reported as a security failure.
Here's my "smbclient -L 192.168.0.3" output:

root@raspberrypi:/# smbclient -L 192.168.0.3
Enter root's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.23c]

Sharename Type Comment
--------- ---- -------
USB1 Disk
HDD1 Disk
IPC$ IPC IPC Service (Samba 3.0.23c)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.23c]

Server Comment
--------- -------
EMTEC Samba 3.0.23c
RASPBERRYPI raspberrypi server

Workgroup Master
--------- -------
WORKGROUP EMTEC

As You can see i can list the shares on 192.168.0.3 but i cannot mount them anymore on the same location i've used to mount them ...2 days ago !!
This is becoming annoying !

BR
Maurizio

wob86
Posts: 8
Joined: Wed Mar 07, 2012 10:41 am
Contact: Website

Re: CIFS Permission denied error

Thu Nov 14, 2013 6:47 pm

I had the same problem, I found that by add sec=none to mount command after -o worked, so something like:

Code: Select all

mount -t cifs -o sec=none //192.168.0.3/USB1 temp_smb
Not best practise as it is turning off security but as a quick work around it should work.

n0c0d3
Posts: 6
Joined: Wed Jan 25, 2012 3:17 pm

Re: CIFS Permission denied error

Tue Nov 19, 2013 10:17 am

wob86 wrote:I had the same problem, I found that by add sec=none to mount command after -o worked, so something like:

Code: Select all

mount -t cifs -o sec=none //192.168.0.3/USB1 temp_smb
Not best practise as it is turning off security but as a quick work around it should work.

Thanks a lot ! It worked!

Do You know why this started to happen from a specific update/kernel ? Just curious ..

Thanks again,
Maurizio

n0c0d3
Posts: 6
Joined: Wed Jan 25, 2012 3:17 pm

Re: CIFS Permission denied error

Fri Nov 22, 2013 4:43 pm

wob86 wrote:I had the same problem, I found that by add sec=none to mount command after -o worked, so something like:

Code: Select all

mount -t cifs -o sec=none //192.168.0.3/USB1 temp_smb
Not best practise as it is turning off security but as a quick work around it should work.

Quoting from Raspbmc Website:
Issue mounting CIFS shares

Due to changes in the kernel upstream, Linux now expects NTLMV2 security when mounting CIFS shares. I’ve reversed this functionality and reverted back to standard NTLM negotiation. You would have only seen this issue if you were mounting shares through fstab or the mount command. This was introduced by this commit to the Linux kernel upstream. My profuse apologies for letting it slip.
How come no one in the forum did not mention this ? :(

BR
MAurizio

User avatar
Cole_Trickle
Posts: 8
Joined: Sat Nov 09, 2013 11:40 pm

Re: CIFS Permission denied error

Tue Nov 26, 2013 5:55 am

Maurizio, based on that "issue with mounting through CIFS" what version did that apply to and have you been able to work around it. I am getting the same error when mounting a share.

root@raspberrypi:/mnt# mount -t cifs -o username='xxxxxx',password='xxxxxxx' //10.88.33.135/Temp /mnt/TPLINK_NAS1
mount error(13): Permission denied


I can see the request hit the share where I am running wireshark. Its is doing my head in, this should be trivial.
ask me about Cisco....

n0c0d3
Posts: 6
Joined: Wed Jan 25, 2012 3:17 pm

Re: CIFS Permission denied error

Tue Nov 26, 2013 8:15 am

Hello,
it has been popping out since 3.10.19 .
Actually i'm running 3.10.19+ #600 and have the same problem.
The only working solution is

mount -t cifs -o sec=none username='xxxxxx',password='xxxxxxx' //10.88.33.135/Temp /mnt/TPLINK_NAS1

It worked for me , i hope also for You.

BR
Maurizio

Cole_Trickle wrote:Maurizio, based on that "issue with mounting through CIFS" what version did that apply to and have you been able to work around it. I am getting the same error when mounting a share.

root@raspberrypi:/mnt# mount -t cifs -o username='xxxxxx',password='xxxxxxx' //10.88.33.135/Temp /mnt/TPLINK_NAS1
mount error(13): Permission denied


I can see the request hit the share where I am running wireshark. Its is doing my head in, this should be trivial.

User avatar
Cole_Trickle
Posts: 8
Joined: Sat Nov 09, 2013 11:40 pm

Re: CIFS Permission denied error

Tue Nov 26, 2013 9:57 am

Yeah cheers guys, that worked.

I also notice that the volume name will need to be added to the mount destination:

where I previously tried:


mount -t cifs -o sec=none //10.88.33.102/temp temp_smb

adding the volume name. volume1 (duh) actually made it work.


mount -t cifs -o sec=none //10.88.33.102/volume1/temp temp_smb

something to keep in mind
ask me about Cisco....

piepie
Posts: 1
Joined: Wed Jan 29, 2014 5:24 pm

Re: CIFS Permission denied error

Wed Jan 29, 2014 5:29 pm

How should we be modifying our /etc/fstab entries to adapt to this?

Took me a while to find this thread, thanks for opening it! What a pain that these breaks occur and only find them on updates and a lot of trial & error!

jmcgril
Posts: 1
Joined: Sun Feb 15, 2015 4:54 pm

Re: CIFS Permission denied error

Mon Feb 16, 2015 4:00 am

Hello,

Does anyone know how to update the Fstab file to get around this error? I am receiving the same error weather I specify username/password or guest. Neither entries below will work. Any help you could provide would be greatly appreciated.

James

//192.168.x.x/public /media/networkshare/public cifs username=admin,password=password,uid=1000,gid=1000,iocharset=utf8 0 0

//192.168.x.x/public /media/networkshare/public cifs guest,uid=1000,gid=1000,iocharset=utf8 0 0

thyaguvinny
Posts: 2
Joined: Sun Feb 22, 2015 4:03 pm

Re: CIFS Permission denied error

Sun Feb 22, 2015 4:06 pm

Hi dear friends!

This solved my problem:

sudo mount -t cifs -o sec=ntlm,user='username',password='password' //ipaddress/device/folder /media/mountingfolder

thyaguvinny
Posts: 2
Joined: Sun Feb 22, 2015 4:03 pm

Re: CIFS Permission denied error

Sun Feb 22, 2015 4:21 pm

Here is another important point... for automatic mount. Here goes my fstab:

//ipaddress/device/folder /media/mountingfolder cifs sec=ntlm,defaults,rw,username=username,password=password 0 0

woopi
Posts: 1
Joined: Sat Feb 28, 2015 10:32 am

Re thyaguvinny: CIFS Permission denied error

Sat Feb 28, 2015 10:34 am

@thyaguvinny

Thank you so much my friend!

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: CIFS Permission denied error

Sat Feb 28, 2015 7:49 pm

thyaguvinny wrote:Here is another important point... for automatic mount. Here goes my fstab:

//ipaddress/device/folder /media/mountingfolder cifs sec=ntlm,defaults,rw,username=username,password=password 0 0
Thank you for that sec=ntlm addition! I have struggled with this for a loooong time without success. This was on a PI1 model B which used to have no issues with mounting cifs shares. I had not used it in a while, and after upgrading then I got "CIFS Permission denied error"

Adding sec=ntlm in /etc/fstab as you showed put me back in business. Thank you! :D

User avatar
douglaslourey
Posts: 18
Joined: Wed Nov 13, 2013 1:43 am

Re: CIFS Permission denied error

Wed Jan 20, 2016 6:52 pm

It seems I am SOL.
I'm running a Raspberry Pi and a Banana Pi. I can map a network folder from Raspberry Pi to Banana Pi, but the opposite won't work using the exact same configuration and commands. I've tried the assorted and sundry suggestions in this thread with no success. Apt-get upgrade or update won't sync these two systems into functionality.
What I'd love to see is a contra-command to update, i.e. "apt-get -downgrade"

Roaches check-in, but they can't check-out.

DirkS
Posts: 10345
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: CIFS Permission denied error

Thu Jan 21, 2016 8:29 am

douglaslourey wrote:It seems I am SOL.
No idea what that means, but if both systems are running Linux you should try NFS.

dikkedimi
Posts: 2
Joined: Fri Mar 24, 2017 12:24 pm

Re: CIFS Permission denied error

Fri Mar 24, 2017 12:30 pm

thyaguvinny wrote:Hi dear friends!

This solved my problem:

sudo mount -t cifs -o sec=ntlm,user='username',password='password' //ipaddress/device/folder /media/mountingfolder

and mine! thanks!
When I used an IP address I was able to connect. But I'd rather use a local hostname (as IP's can change when you buy new gear sometimes) When using a hostname I wasn't able to connect at first, but found out that if you're using a hostname, you should add .local (or whatever your local domain is) to the hostname.

brat.ibr
Posts: 7
Joined: Sat Dec 19, 2015 12:55 am

Re: CIFS Permission denied error

Sat Aug 19, 2017 1:16 am

Hi guys,
I have been battling for he last 4 DAYS pretty consistently trying to get my Pi ZERO connected to my Windows. Spent many hours trying all the combinations of set= and ver= for cifs with a varying set of errors ranging from Permission denied and Invalid argument etc. Decided to start from the beginning and check the line of code from scratch. This was working on my RPi B+ V1.2 and still does:

Code: Select all

sudo mount -t cifs -o user=myusername "//192.168.0.7/Users/Public/w7dirname" /media/pidirname
For the Pi ZERO W I spent days trying to find a simple code with MINIMUM modified parameters ( I live by KISS ) and got this to work:

Code: Select all

sudo mount-cifs -v //192.168.8.100/Public/w7dirname  /media/pidirname --verbose -o user=myusername
The problem I was having was that for the ZERO (which is connecting through a different modem 8.100 instead of 0.7) I had included /Users/ for the W7 directory name on my W7 laptop. The /Users/ pathname was not required. I do not know why but the purpose of this POST is to stress
a) Keep coding as simple as possible KISS ( do not go to extra paramaters unless all else fails. No sec= domain= or ver= for cifs) AND
b) Always check the code sections that you "know" are right first because "knowing" that they are right instead of checking them can cost a lot of frustration.
Hope that dissertation helps someone out there. Regards all, ianm

Return to “Raspberry Pi OS”