Solved

question regarding linux mount

Posted on 2014-04-28
10
556 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
 
LVL 61

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 61

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 61

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now