LinuxQuestions.org
Visit Jeremy's Blog.
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 09-20-2008, 03:25 PM   #1
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
mountpoint permissions


What are the requirements for a user to mount something in the fstab? rx permissions on the directory?

Here's what is troubling me. I have the following lines in my fstab.
Code:
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

//windows-machine/share	/media/windows-machine/share cifs noauto,user,file_mode=0600,dir_mode=0700,credentials=credfile 0 0
So, cds and that windows share should both be able to be mounted by ordinary users.

Here's the listing of each mountpoint and the mount commands:
Code:
drwxr-xr-x 2 root root 4096 2008-09-14 22:46 cdrom0
drwxr-xr-x 2 root root 4096 2008-09-18 14:39 share

-rwsr-xr-x 1 root root 81368 2008-04-29 07:57 /bin/mount
-rwsr-xr-x 1 root root 23340 2008-09-10 14:55 /sbin/mount.cifs
So everything should behave exactly the same. However, the cdrom mounts just fine and the windows share fails with this:
Code:
mount error: permission denied or not superuser and mount.cifs not installed SUID
(Note: if I change ownership on the mountpoint for the windows share it all works fine, but I don't see why there should be a difference between this two devices.)
 
Old 09-22-2008, 12:01 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
what distro are you running
 
Old 09-22-2008, 02:35 AM   #3
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Original Poster
Rep: Reputation: 67
Ubuntu Hardy
 
Old 09-22-2008, 02:37 AM   #4
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by John VV View Post
what distro are you running
Ubuntu Hardy.

Could it have something to do with AppArmor?
 
Old 09-22-2008, 07:30 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
The distro shouldn't really matter.

Read the "mount" man page. The option you need is probably "users", which is very different from "user". Both options do different things.
 
Old 09-22-2008, 07:44 AM   #6
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by i92guboj View Post
The distro shouldn't really matter.

Read the "mount" man page. The option you need is probably "users", which is very different from "user". Both options do different things.
Well, that option doesn't affect this issue. The "users" option allows any user to mount as well as any user to unmount. Whereas the "user" option only allows root or the original mounting user to unmount.
 
Old 09-22-2008, 08:04 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Meson View Post
Well, that option doesn't affect this issue. The "users" option allows any user to mount as well as any user to unmount.
Maybe I didn't understand your question adequately, I thought that that was what you were asking.
 
Old 09-22-2008, 10:07 AM   #8
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by i92guboj View Post
Maybe I didn't understand your question adequately, I thought that that was what you were asking.
What I'm asking is that given the similar fstab entry, the same permissions and owner on the mountpoint, and same permissions and owner on mount and mount.cifs, why is the one failing...
 
  


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
Mountpoint cthomas Linux - Networking 1 02-23-2006 02:28 PM
Can't remove Samba mountpoint NelsonN Mandriva 3 02-19-2005 02:16 PM
Partition vs Mountpoint Dahak Linux - Newbie 7 01-11-2005 12:06 AM
Can't change permissions on mountpoint sharpie Linux - Newbie 7 03-28-2004 11:25 PM
permissions problems on mountpoint Little devil Linux - General 2 06-24-2003 01:02 PM

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

All times are GMT -5. The time now is 12:12 AM.

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