LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-19-2008, 06:26 AM   #1
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
Question related to sharing a drive/directory by a normal user


Dear friends,
1.is it not possible for a normal user to share a directory through nfs, only root can do that.?
2.Mounting a directory is not at all possible for a normal user. Why.? Then how can he mount a cd drive. How can he mount a pen drive...?
3.In a normal linux environment what is the solution for this.
please respond.
 
Old 11-19-2008, 07:38 AM   #2
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
I'm not particularly familiar with sharing directories but as for point 2...

An extract from the mount man page:

...
Quote:
(iii) Normally, only the superuser can mount file systems. However, when fstab contains the user option on a line, then anybody can mount the corresponding system.

Thus, given a line


/dev/cdrom /cd iso9660 ro,user,noauto,unhide

any user can mount the iso9660 file system found on his CDROM using the command


mount /dev/cdrom

or


mount /cd
...

user
Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).
users
Allow every user to mount and unmount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
...

So by adding "user" to the mount options in fstab a normal user will be able to mount the device.
 
Old 11-19-2008, 08:50 AM   #3
n03x3c
Member
 
Registered: Aug 2008
Location: India
Distribution: Fedora, RedHat
Posts: 101

Rep: Reputation: 17
Well NFS is server thing, and that's why it should be done by root, or someone would share your home dir in network, and user with UID that you're having, will have access to your files. So only root can do that.

If you want to do that, ask the root (or your self) to give normal user sudo rights for TUI cmds that're needed to setup and start NFS... and set some custom ACLS on /etc/exports file Then you can do it
 
Old 11-20-2008, 01:04 AM   #4
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
n03x3c,mickyg! Thanks so much for your valuable replies. bye.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory Related Question leebrent Programming 9 08-14-2008 02:33 PM
Mounting a hard drive so that a normal user get write access raghesh Linux - General 4 08-24-2007 01:26 AM
user creation related question Menestrel Linux - Newbie 2 05-15-2004 03:44 PM
Letting normal user change apache directory nivek7 Linux - General 9 05-04-2004 07:58 PM
Mounting a network drive so a normal user can rwx it J.Q. Monkey Linux - Newbie 4 02-20-2004 08:17 AM


All times are GMT -5. The time now is 06: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration