<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: processes accessing a file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698382#M383763</link>
    <description>&amp;gt;&amp;gt;What command(s) can I use to see what process(es) are accessing a file&lt;BR /&gt;&lt;BR /&gt;fuser and lsof come to mind.  &lt;BR /&gt;&lt;BR /&gt;fuser -u yourfilehere&lt;BR /&gt;&lt;BR /&gt;lsof yourfilehere&lt;BR /&gt;&lt;BR /&gt;Note that lsof is not part of a standard HP-UX install and must be installed separately.&lt;BR /&gt;&lt;BR /&gt;See the fuser and lsof (if installed) man pages for more information.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;what kind of access they have (read/write, etc) &lt;BR /&gt;&lt;BR /&gt;You would have to see what user started the process that is accessing the file, see what groups that user is a member of and then look at the permissions on the file to determine what can be done.&lt;BR /&gt;&lt;BR /&gt;For example, if the user 'fido' is accessing file /a/b/c/file1 and fido is part of groups grp1 and grp3.  Do an 'ls -l' on /a/b/c/file1 and look at the permissions.&lt;BR /&gt;&lt;BR /&gt;Say file1 is:&lt;BR /&gt;&lt;BR /&gt;-rwxrwxr-x 1 user1 grp3 123456 Oct 12 08:03 file1&lt;BR /&gt;&lt;BR /&gt;The file is owned by user1 (who has read, write and exec permission) and the group is grp3 (which also has rwx permission).  Since 'fido' is a member of grp3 it can read, write and execute the file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;can more than one process access a file?&lt;BR /&gt;&lt;BR /&gt;Absolutely!!!!!!  It would be hard to be a multi-user operating without that capability!</description>
    <pubDate>Tue, 12 Oct 2010 12:24:41 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2010-10-12T12:24:41Z</dc:date>
    <item>
      <title>processes accessing a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698380#M383761</link>
      <description>What command(s) can I use to see what process(es) are accessing a file and what kind of access they have (read/write, etc) and can more than one process access a file?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Tue, 12 Oct 2010 12:04:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698380#M383761</guid>
      <dc:creator>jackie baron_1</dc:creator>
      <dc:date>2010-10-12T12:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: processes accessing a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698381#M383762</link>
      <description>Hi , &lt;BR /&gt;&lt;BR /&gt;lsof will be your friend . You should be dowlaod a depot at  &lt;A href="http://hpux.connect.org.uk/" target="_blank"&gt;http://hpux.connect.org.uk/&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Regards ,</description>
      <pubDate>Tue, 12 Oct 2010 12:18:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698381#M383762</guid>
      <dc:creator>merieux</dc:creator>
      <dc:date>2010-10-12T12:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: processes accessing a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698382#M383763</link>
      <description>&amp;gt;&amp;gt;What command(s) can I use to see what process(es) are accessing a file&lt;BR /&gt;&lt;BR /&gt;fuser and lsof come to mind.  &lt;BR /&gt;&lt;BR /&gt;fuser -u yourfilehere&lt;BR /&gt;&lt;BR /&gt;lsof yourfilehere&lt;BR /&gt;&lt;BR /&gt;Note that lsof is not part of a standard HP-UX install and must be installed separately.&lt;BR /&gt;&lt;BR /&gt;See the fuser and lsof (if installed) man pages for more information.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;what kind of access they have (read/write, etc) &lt;BR /&gt;&lt;BR /&gt;You would have to see what user started the process that is accessing the file, see what groups that user is a member of and then look at the permissions on the file to determine what can be done.&lt;BR /&gt;&lt;BR /&gt;For example, if the user 'fido' is accessing file /a/b/c/file1 and fido is part of groups grp1 and grp3.  Do an 'ls -l' on /a/b/c/file1 and look at the permissions.&lt;BR /&gt;&lt;BR /&gt;Say file1 is:&lt;BR /&gt;&lt;BR /&gt;-rwxrwxr-x 1 user1 grp3 123456 Oct 12 08:03 file1&lt;BR /&gt;&lt;BR /&gt;The file is owned by user1 (who has read, write and exec permission) and the group is grp3 (which also has rwx permission).  Since 'fido' is a member of grp3 it can read, write and execute the file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;can more than one process access a file?&lt;BR /&gt;&lt;BR /&gt;Absolutely!!!!!!  It would be hard to be a multi-user operating without that capability!</description>
      <pubDate>Tue, 12 Oct 2010 12:24:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698382#M383763</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-10-12T12:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: processes accessing a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698383#M383764</link>
      <description>Lovely. Thank you.</description>
      <pubDate>Tue, 12 Oct 2010 13:09:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/processes-accessing-a-file/m-p/4698383#M383764</guid>
      <dc:creator>jackie baron_1</dc:creator>
      <dc:date>2010-10-12T13:09:53Z</dc:date>
    </item>
  </channel>
</rss>

