Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem in creating and reading files in CIFS mount in linux

Posted on 2014-04-29
2
Medium Priority
?
586 Views
Last Modified: 2014-05-02
Hello Experts,

I have directory which is mounted to cifs share via /etc/fstab file, the directory has  permission has shown below when it is mounted.

# ll
total 11509
drwxrwxrwx 1 applmgr dba    4096 Apr 29 01:26 HFM_BPC_TRIGGER_FILES

i have user name oracle who is part of dba group.
id oracle
uid=200(oracle) gid=511(oinstall) groups=511(oinstall),512(dba)

we have pl/sql script that is being invoked using oracle id, and that script writes output file to HFM_BPC_TRIGGER_FILES directory. The weird thing is that i can not see the output file when the directory is mounted to cifs share, and when i unmount it i can see the output file.

can someone shed light on why this behaviour ?

my fstab entry

//windows_server/Trigger_BPC/    /oracle/d1/oracle/xxvm/11.5.0/data/outlooksoft/HFM_BPC_TRIGGER_FILES cifs rw,credentials=/opt/int9/.pass,file_mode=0777,dir_mode=0777,uid=212,gid=512   0 0
0
Comment
Question by:sudhirgoogle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 750 total points
ID: 40029353
When the mount is disconnected, where do you see the files?

In the Trigger_BPC folder?
Or in the /oracle/d1/oracle/xxvm/11.5.0/data/outlooksoft/HFM_BPC_TRIGGER_FILES folder?

Look in the server logs on the server (the one with fstab). Are there errors that mention HFM_BPC_TRIGGER_FILES?
0
 
LVL 13

Assisted Solution

by:Daniel Helgenberger
Daniel Helgenberger earned 750 total points
ID: 40030439
Hello,

can you please explain this part in more detail:
The weird thing is that i can not see the output file when the directory is mounted to cifs share, and when i unmount it i can see the output file.

Where do you see the file and when exactly? Do you see it the local directory then the cifs share is unmounted?

Also, you may want to use lsof when the script is running; the following shows you all processes accessing your share at the moment:
lsof | grep HFM_BPC_TRIGGER_FILES

Open in new window


This way you see if your perl script has the file really open.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

715 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