LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-30-2004, 07:33 PM   #1
paco36
Member
 
Registered: Jan 2004
Distribution: Fedora Core 2, Gentoo
Posts: 33

Rep: Reputation: 15
Mount SMB drive as user: Operation Not Permitted


I am trying to mount an SMB drive as a non root user.

The line in my fstab is:
//192.168.0.2/music /mnt/music smbfs user,auto,username=user,password=pass,umask=0

It should mount when the system boots. But in the rare occasion that the other machine is not on... it won't... obviously.

So I want to beable to mount it without being root.

When I type mount /mnt/music in console as a user it says:
cannot mount on /mnt/music: Operation not permitted
smbmnt failed: 1

Any Ideas?
Thanks
-paco
 
Old 07-31-2004, 04:36 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
try mounting it to a point in your users home directory.
good luck.
 
Old 09-08-2004, 07:31 PM   #3
cruzfernandez
LQ Newbie
 
Registered: Jun 2003
Posts: 5

Rep: Reputation: 0
have the same problem

i can solve my problem if i put the user as the OWNER of the directory. Probably that is why it works to peacedog. (chown cruz.root /mnt/share)

I need all the users to access the share, and this is not a solution.

this is a bug of smbfs, i am almost shure

in my log it shows this (dmesg):

smbfs: Unrecognized mount option noexec

Last edited by cruzfernandez; 09-08-2004 at 07:36 PM.
 
Old 09-08-2004, 08:59 PM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
cruz: try chown cruz:users /mnt/share, and chmod g+rx /mnt/share

everyone in the users group *should* be able to access the share regardless of who mounted it (though I think all activity will be logged as if by the user who did the mount, since the system will use that username and password). Add +w permission if that's appropriate.

peacedog - in the interests of learning and living, you might like to know there's a typo in your signature (your instead of you're)
 
Old 09-08-2004, 10:03 PM   #5
cruzfernandez
LQ Newbie
 
Registered: Jun 2003
Posts: 5

Rep: Reputation: 0
You are correct, but the share can ONLY be mounted by user cruz.

there must be a bug in smbmount. In many pages this problem is mentioned, and no real solution is posted.

a lot of is required to solve this problem.
 
Old 09-08-2004, 11:32 PM   #6
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Ah, I misunderstood - I thought you meant they all needed access to it, not that they all needed to be able to mount it.

From the smbmnt man page:
A setuid smbmnt will only allow mounts on directories owned by the user, and that the user has write permission on.

(and of course, a non-suid smbmnt can only be run by root).

You can get around this by giving the users group write access to /mnt, and making a script that creates the directory and mounts the share via smbmount, and another that removes the directory after smbumount. It's a bit of a pain, and you have to retrain your users to run your script instead of mount <dir>, but it will work.

Another option would be to set up a root cron job that checks the status every <x> minutes and reconnects if necessary.
 
Old 09-12-2004, 06:07 PM   #7
cruzfernandez
LQ Newbie
 
Registered: Jun 2003
Posts: 5

Rep: Reputation: 0
mmmh.. interesting workaround

what if i touch the code of smbmount and change it so it looks at /etc/fstab to check user?????

https://bugzilla.samba.org/show_bug.cgi?id=1617

that would fix the bug????
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
su - user : /dev/pts/# Operation not permitted problem buaku Slackware 4 10-16-2005 08:08 PM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration