All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael_OF <michaelof-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: user mount.cifs with credentials file results in "error 13 (Permission denied) opening credential file"
Date: Thu, 06 Nov 2014 04:07:01 +0100	[thread overview]
Message-ID: <545AE5D5.7090602@rocketmail.com> (raw)

Hi all,


I want to enable a user mount of a remote samba share. OpenSuse 13.1.
First step was to enable setuid bit for /etc/mount.cifs.
To keep mount as easy as possible, I've added an /etc/fstab entry like this:
   //host/share /mount_dir user=user,users 0 0

Works fine in bash, prompts for remote user's password.
Does not work in KDE's dolphin, no action when clicking on location bar's entry "share on host"

I then recognized the "credentials" option and changed the /etc/fstab entry like this:
   //host/share /mount_dir cifs credentials=/root/cred-file,users 0 0

(sudo chmod 600 /root/cred-file, to protect password)

Having done this, e.g.
   mount /mount_dir
as "root" or with sudo works fine.

But NOT as an end user: "error 13 (Permission denied) opening credential file /root/cred-file"
Both in bash or Dolphin.

chmod to allow read credential file for any user "solves" the problem, so it's really a local access right issue.

Which in fact seems to make user cifs mount impossible, at least this way.
And which confuses me: Why, if the mount.cifs program has the sticky bit set, it's not allowed to open a root-owned file?

Is this a bug, should I file it in bugzilla?


Thanks in advance,
Michael

             reply	other threads:[~2014-11-06  3:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06  3:07 Michael_OF [this message]
     [not found] ` <545AE5D5.7090602-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org>
2014-11-07 15:45   ` user mount.cifs with credentials file results in "error 13 (Permission denied) opening credential file" Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545AE5D5.7090602@rocketmail.com \
    --to=michaelof-ur4tiblo6gon+bqq9rbeug@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.