Solved

question regarding linux mount

Posted on 2014-04-28
10
567 Views
Last Modified: 2014-04-29
I have directory which is mounted to cifs share via /etc/fstab file, the directory has  permission has shown below when it is not mounted.

# ll
total 11509
drwxrwxrwx 2 applmgr dba    198 Apr 28 01:26 HFM_BPC_TRIGGER_FILES

when i do mount -a, immediately the above directory owner changes to root as shown below

# mount -a
# ll
total 11510
drwxr-xr-x 1 root    root    4096 Apr 28 01:38 HFM_BPC_TRIGGER_FILES

here is the /etc/fstab file entry for the about mount point
//windowserver/BPC/    /oracle/HFM_BPC_TRIGGER_FILES cifs rw,credentials=/opt/int9/.pass,file_mode=0644,dir_mode=0755   0 0

when the folder is mounted i want the file permission to be retained as shown below

drwxrwxrwx 2 applmgr dba     198 Apr 28 01:26 HFM_BPC_TRIGGER_FILES


how can i achieve this ?
0
Comment
Question by:sudhirgoogle
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40026982
mount always mounts everything as root. Or, more correctly, the owner of the mount point becomes the owner of the directory that is mounted there. When mounting a file system, that will be / so owned by root.
0
 
LVL 1

Author Comment

by:sudhirgoogle
ID: 40027011
how do i mount using  applmgr user ?
0
 
LVL 16

Expert Comment

by:gurutc
ID: 40027027
Hi,

you can create the mount point: HFM_BPC_TRIGGER_FILES

using the applmgr userid.

- gurutc
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40027035
add to mount parameters:
rw,credentials=/opt/int9/.pass,file_mode=0600,dir_mode=0700,uid=<numeric of applmgr>,gid=<numeric of dba>

(i remove unnecessary access to CIFS for non-oracle users - backups should go via RMAN and not file backup)
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40027079
Just before EE went down, I tried to post that cifs mounts have a uid option (which does accept user names as well as numbers). It also has forceuid for when the remote system tries to send a uid. See man 8 mount.cifs
0
 
LVL 62

Expert Comment

by:gheist
ID: 40027088
It actually accepts user names, but only in multiuser mode, i.e. not in fstab
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40027103
Weird
0
 
LVL 62

Expert Comment

by:gheist
ID: 40027107
Exactly. numbers are much safer...
0
 
LVL 13

Expert Comment

by:Sandy
ID: 40028956
Check with NAS for POSIX permission he has choosed..

TY/SA
0
 
LVL 1

Author Closing Comment

by:sudhirgoogle
ID: 40029013
Thanks for your solution.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Impact of disabling SMB v1 on Mac and Linux clients 4 548
Run Secure WMI query from CentOS 5 84
The better OS Architecture 13 67
Solaris acount issues 44 29
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question