Re: Mounting NAS, fstab, mount failed
Quote:
Originally Posted by
robin_listas
On 2012-06-14 05:36, roidemai wrote:
>
> robin_listas;2469230 Wrote:
>> For mounting as user you need to add the option "user" or "users".
>
> Might you provide an example of how to alter the fstab entry for this
> option?
Code:
//192.168.1.130/nas /mnt/nas cifs
credentials=/root/smb/credentials,_netdev,uid=aaa,gid=users,user 0 0
How is this different than the fstab entry I had originally (gid=users)? I can't find another example online of 'gid=users,user', and my username is part of the group 'users' already. I don't have a group named 'user'; was this meant to be renamed for some specific group I create?
Quote:
> Code:
> --------------------
>
> linux-8nxi:/home/aaa #
> --------------------
Quote:
Just what I thought! You are using "su". You must use "su -" and try again.
Now guess how I know ;-)
Code:
su -
Password:
linux-8nxi:~ # chmod -s /sbin/mount.cifs
linux-8nxi:~ # mount -a
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
This doesn't seem to resolve the problem, unfortunately.
Re: Mounting NAS, fstab, mount failed
On 2012-06-14 17:06, roidemai wrote:
>
> robin_listas;2469290 Wrote:
....
> How is this different than the fstab entry I had originally
> (gid=users)? I can't find another example online of 'gid=users,user',
> and my username is part of the group 'users' already. I don't have a
> group named 'user'; was this meant to be renamed for some specific group
> I create?
Read the man pages of fstab and mount :-)
The 'user' word I wrote there does not belong to the "gid=users" you wrote,
there is a comma separator. It is a separate option.
> This doesn't seem to resolve the problem, unfortunately.
But have you modified fstab yet as I proposed?
The manual says:
+++····················
NOTES
This command may be used only by root, unless installed setuid, in
which case the noeexec and nosuid mount flags are enabled. When installed
as a setuid program, the program follows the conventions set forth by the
mount program for user mounts, with the added restriction that users must
be able to chdir() into the mountpoint prior to the mount in order to be
able to mount onto it.
····················++-
Is this done?
--
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 "Celadon" at Telcontar)
Re: Mounting NAS, fstab, mount failed
Aha, okay! Ya entiendo.
Indeed I did make that correction to fstab, and then rebooted.
Code:
linux-8nxi:~ # cat /etc/fstab
//192.168.1.130/nas /mnt/nas cifs credentials=/root/smb/credentials,_netdev,uid=aaa,gid=users,user 0 0
When I try to select the NAS folder, dolphin gives me the error:
Code:
An error occurred while accessing 'nas on //192.168.1.130', the system responded: This program is not installed setuid root - "user" CIFS mounts not supported.
Similarly,
Code:
su -
Password:
linux-8nxi:~ # mount -a
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Whereas previously, before I had ever issued the 'chmod +s /sbin/mount.cifs', I could execute 'mount -a' without any errors.
Thanks again for following me through this.
Re: Mounting NAS, fstab, mount failed
On 2012-06-14 20:26, roidemai wrote:
>
> Aha, okay! Ya entiendo.
Good :-)
> When I try to select the NAS folder, dolphin gives me the error:
Ignore dolphin, I can not help there
> Similarly,
>
>
> Code:
> --------------------
> su -
> Password:
> linux-8nxi:~ # mount -a
> mount error(13): Permission denied
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
>
> --------------------
So, the permissions there are wrong.
>
>
> Whereas previously, before I had ever issued the 'chmod +s
> /sbin/mount.cifs', I could execute 'mount -a' without any errors.
Well, paste here the permissions so that I can see them :-)
Code:
ls -l /sbin/mount.cifs
> Thanks again for following me through this.
Welcome :-)
--
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 "Celadon" at Telcontar)
Re: Mounting NAS, fstab, mount failed
On 2012-06-14 20:26, roidemai wrote:
> Code:
> --------------------
> su -
> Password:
> linux-8nxi:~ # mount -a
> mount error(13): Permission denied
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
>
> --------------------
I forgot. Don't use "mount -a", but "mount /mnt/nas" only.
--
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 "Celadon" at Telcontar)
Re: Mounting NAS, fstab, mount failed
Here you go:
Code:
linux-8nxi:~ # ls -l /sbin/mount.cifs
-rwxr-xr-x 1 root root 36504 Feb 19 2011 /sbin/mount.cifs
linux-8nxi:~ # mount /mnt/nas
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Re: Mounting NAS, fstab, mount failed
On 2012-06-15 06:16, roidemai wrote:
>
> Here you go:
>
>
> Code:
> --------------------
>
> linux-8nxi:~ # ls -l /sbin/mount.cifs
> -rwxr-xr-x 1 root root 36504 Feb 19 2011 /sbin/mount.cifs
> linux-8nxi:~ # mount /mnt/nas
> mount error(13): Permission denied
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
>
> --------------------
Aha, it is not setup suid. You have to do the chmod thing again.
--
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 "Celadon" at Telcontar)
Re: Mounting NAS, fstab, mount failed
I realy do not get this.
mount is executed by root. It calls mount.cifs which is accordingly also executed by root. What is the use of setting mount.cifs to suid root?
And when this should be the case, why isn't it installed as such in the first place. Changing these settings is something I would not trust to be done by most Linux users. And it will be undone in any update. What is the idea behind this?
Re: Mounting NAS, fstab, mount failed
Quote:
Originally Posted by
robin_listas
On 2012-06-15 06:16, roidemai wrote:
Aha, it is not setup suid. You have to do the chmod thing again.
Like so?
Code:
linux-8nxi:~ # chmod +s /sbin/mount.cifs
linux-8nxi:~ # ls -l /sbin/mount.cifs
-rwsr-sr-x 1 root root 36504 Feb 19 2011 /sbin/mount.cifs
linux-8nxi:~ # mount /mnt/nas
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
I rebooted as well after the chmod +s, just in case, but receive the same mount error.
Re: Mounting NAS, fstab, mount failed
On 2012-06-15 13:06, hcvv wrote:
>
> I realy do not get this.
>
> -mount- is executed by -root. -It calls -mount.cifs- which is
> accordingly also executed by -root. -What is the use of setting
> -mount.cifs- to -suid- -root?-
Good point indeed... :-?
> And when this should be the case, why isn't it installed as such in the
> first place. Changing these settings is something I would not trust to
> be done by most Linux users. And it will be undone in any update. What
> is the idea behind this?
Because the manual says so, but you are right, for normal users. You can
restrict it to some users by removing permissions for "other" and joining
the "root" group.
--
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 "Celadon" at Telcontar)