Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Mount problem "only root can do that"

    well i have an NFS server setup on a pc "server1" running Fedora Core 4 and i need to mount this from a non-root user. But when i try this i get this freaking error "mount: only root can do this". i do have the entry in fstab file and i tried following solution [none of these work]
    entry in fstab is
    server1:/home/user/common /home/user/common nfs rw,hard,intr 0 0

    adding +x permission to /bin/mount for every everyone
    setting SUID
    mounting without fstab entry and with fstab entry
    adding users in entry in fstab

    but none of this worked for me. thats all i could find after googling and visiting many a forums. Any help in this regard will be much appreciated,

  2. #2
    Just Joined! rohan_nakar's Avatar
    Join Date
    Dec 2006

    Thumbs down

    It shows u the error coz only root has the permission to mount, so a nonroot user can't mount...

  3. #3
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    South- or "Mid-" Sweden
    man mount says this about 2 user* option you can use:
    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
    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
    Choose one of them, also, note that they imply noexec, nosuid, and nodev - so if you got programs on it (and/or suid/sgid files) you might want to add exec and/or suid on *after* user or users (you'll probably not need dev - read the man page for details).
    Regards Scienitca (registered user #335819 - )
    A master is nothing more than a student who knows something of which he can teach to other students.

  4. $spacer_open
  5. #4
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Riverton, UT, USA
    Ditto what scientica said. Since you mention that you already tried that, can you post the entire contents of /etc/fstab with the user option added? It may just be a syntax thing.
    Stand up and be counted as a Linux user!

  6. #5

    Thumbs up

    yup i got it figured out
    'user' worked for me thought 'users' didn't
    thanks a lot everyone

    but now i've got another [though different] problem
    when i try to mount NFS from that non-root user, i get an access denied error

    I've exported /home/user/common to a subnet with read/write permissions (rw)
    That subnet is also there in hosts.allow file. I've also tried stopping iptables service just to make sure it isn't creating the problem.

    Can anyone help [seems like i'm having a badluck charm. when i solve one problem, i'm stuck into another]

    Note: When i exported a folder in root [/root/common] with same permissions and tried to access it through root user from the client machine, i had absolutely no problem. But this isn't working though i've even used the same username for client and server machine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts