Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-04-2014, 03:20 PM   #1
Registered: May 2011
Posts: 70

Rep: Reputation: 0
How to mount filesystem with correct user locally for a mountpoint

Hi Folks,

 I created a Virtual Machine and created few mount points 


Everything is fine after VM creation (used oracle virtualbox) and now when it reboots it always comes as root:root for the mount point.

Below is from my fstab
/dev/mapper/vg_host1-lv_wd_admin          /opt/admin/install           ext4    defaults         1 2

$ ls -ld /opt/admin/install
drwxr-xr-x. 2 root root 4096 May  4 11:16 /opt/admin/install

Since i want that mountpoint to be owned by wdadmin:wdgrp i tried updating the fstab as below
but interestingly the mountpoint didnt showup after reboot.

/dev/mapper/vg_host1-lv_wd_admin         /opt/admin/install           ext4    defaults,rw,uid=wdadmin,gid=wdgrp,dmask=022,fmask=055        1 2

after reboot i cant see this mountpoint so can some one please give me the correct syntax to fstab to mount the mountpoint (local mount point) to wdamin:wdgroup

Since this is local mountpoint

Last edited by maddyfreaks; 05-04-2014 at 03:21 PM. Reason: corrected typo
Old 05-04-2014, 03:55 PM   #2
Registered: May 2011
Posts: 70

Original Poster
Rep: Reputation: 0
can some one please help .
Old 05-04-2014, 04:37 PM   #3
Registered: Dec 2010
Posts: 277

Rep: Reputation: 24
unsure of the details pertaining to fstab, its proper flags, or how it interacts with virtual machines, but a hackaound may be to just write a one liner with mount and place it in a startup script to be run with each reboot

sudo mount -o rw,gid=wdgrp,uid=wdadmin,dmask=022,fmask=055 /dev/mapper/vg_host1-lv_wd_admin /opt/admin/install

Last edited by cin_; 05-04-2014 at 04:41 PM. Reason: gramm`err
Old 05-04-2014, 04:39 PM   #4
Registered: May 2011
Posts: 70

Original Poster
Rep: Reputation: 0
even i got the idea to add small script but not sure in which script i need to add this details (or) how to make my script run after the reboot (this should happen before my application starts)

Appreciate if you can give me some tips
Old 05-04-2014, 04:46 PM   #5
Registered: Dec 2010
Posts: 277

Rep: Reputation: 24

you could try..?

The systemwide initialization file, executed for login shells

it really depends on how your system is set up,
search for some literature on initialization files pertaining to your setup, eg. distro, desktop environment, shell et al

Last edited by cin_; 05-04-2014 at 04:46 PM. Reason: gramm`err
Old 05-04-2014, 08:05 PM   #6
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,255
Blog Entries: 16

Rep: Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120
maddyfreaks, this is a volunteer forum and today is a weekend day for many persons.

Please relax and give persons a reasonable amount of time to see your post, decide that they can help, and frame a reply.
Old 05-05-2014, 01:54 PM   #7
Registered: Jan 2011
Location: Bangalore
Distribution: RHEL,OEL
Posts: 57

Rep: Reputation: 0
chown -R wdadmin:wdgrp /opt/admin/install ---> Please set ownership and group for that mounted directory and try rebooting.

I am really sorry If I am not given the correct answer,please let me know if I am wrong.



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
[SOLVED] User has no write access to mountpoint gonny95 Linux - Newbie 3 02-08-2014 11:25 PM
autofs with cifs filesystem creating mountpoint twice? kayasaman Linux - Server 2 03-25-2012 09:35 AM
How can I give 1 user access to mount 1 particular filesystem? wjtaylor Linux - Server 4 06-13-2011 10:34 PM
iPod Mountpoint Automatically Erased, Unable to Mount Again. EzNaChOs Linux - Hardware 1 02-03-2011 07:34 AM
mount linux as samba client, own mountpoint carlbrans Linux - Networking 1 10-15-2004 05:01 PM

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

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