'mount error 13 = Permission denied' when user mounts cifs (sudo works!)

Bug #305454 reported by Ernst on 2008-12-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)

Bug Description

Binary package hint: samba

I'm using samba to share files between my home computer (dual boot Windows/Ubuntu 8.10) and my laptop (Ubuntu 8.10). Most of the time, Windows is running at the home computer. Sharing goes fine with the following fstab entry:

// /home/<user>/media cifs noauto,users,exec,uid=1000,gid=1000,password=,iocharset=utf8 0 0

With this command line, a user can mount it (if Windows shares the directory!).

Yesterday I booted again to Ubuntu on my home computer and there were a lot of updates, I also think Samba got updated. I noticed that all my shares were unshared, so I had to share my folders again. I did so, using the 'Share' tab of the folder and I gave access to guests.

Now, on my laptop I can only mount the share as super user (sudo mount ~/media). If I mount the share as normal user, I get the following message:

mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

This used to work, but now it doesn't. So, I think this justifies a bug report. Hopefully, this makes Ubuntu better :-).
(Again: If I share a map on Windows (Desktop) and access this map with Ubuntu (Laptop), a user can mount it. If I share a map on Ubuntu (Desktop) and access this map with Ubuntu (Laptop), a user cannot mount the share.)

Some more info:
Both computers are running the following version of Samba:
>apt-cache policy samba
  Installed: 2:3.2.3-1ubuntu3.3
  Candidate: 2:3.2.3-1ubuntu3.3
  Version table:
 *** 2:3.2.3-1ubuntu3.3 0
        500 http://nl.archive.ubuntu.com intrepid-updates/main Packages
        500 http://security.ubuntu.com intrepid-security/main Packages
        100 /var/lib/dpkg/status
     2:3.2.3-1ubuntu3 0
        500 http://nl.archive.ubuntu.com intrepid/main Packages

The laptop has proposed enabled.

Ernst (ernst-blaauw) wrote :

In this bug report, I used anonymous (guest) access to the share. I changed the login policy and now I have to specify a username and password. In contrary to the above bug report, a user is able to mount the new configuration without problems. It seems the bug is related to guest access.

Helzibah (helzibah) wrote :

Seconded. I'm also running Ubuntu 8.10 (with smbclient version 3.2.3) and experienced a similar problem recently. I have three entries like the following (accessing different folders on the server) in my fstab:

//helios/public /media/helios-public cifs defaults,noatime,auto 0 0

Previously this worked fine, now I get some very strange behaviour. With the line above, I get a password request, and then, regardless of what I type:

mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I tried adding the guest option:

//helios/public /media/helios-public cifs defaults,noatime,auto,guest 0 0

This doesn't ask for a password, as expected, but returns the same error. Not to be defeated, I tried adding a username instead:

//helios/public /media/helios-public cifs defaults,noatime,auto,username=guest 0 0

This asks for a password as before, yet bizarrely it accepts whatever I type and mounts the share. So my temporary fix is to add the password option to my fstab with a random word:

//helios/public /media/helios-public cifs defaults,noatime,auto,username=guest,password=foo 0 0

Now my shares are mounted fine without user input, even though both the username and password do not exist. This seems to work fine as a temporary fix for unprotected shares.

Helzibah (helzibah) wrote :

I'm using "sudo mount -a" to mount these shares by the way.

on5sl (on5sl) wrote :

My question is related to this bug:

And Helzibah, when i use sudo mount -a it is working :s...off course my fstab if mentioned to let it mount at user elvel. So that i can mount them without security risks....
So with the sudo my user option in my fstab is no longer of use...

bigal50 (bigal50) wrote :

The current samba version is Candidate: 2:3.2.3-1ubuntu3.4 could you please upgrade to this version and report back.

New > Incomplete

Changed in samba:
status: New → Incomplete
Forest (foresto) wrote :

This bug might be related:


If you're trying to mount a share using guest access, see if the sec=none option works around the failure.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers