- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- processes accessing a file
Operating System - HP-UX
1752282
Members
4408
Online
108786
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2010 05:04 AM
тАО10-12-2010 05:04 AM
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?
thanks
thanks
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2010 05:18 AM
тАО10-12-2010 05:18 AM
Solution
Hi ,
lsof will be your friend . You should be dowlaod a depot at http://hpux.connect.org.uk/
Regards ,
lsof will be your friend . You should be dowlaod a depot at http://hpux.connect.org.uk/
Regards ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2010 05:24 AM
тАО10-12-2010 05:24 AM
Re: processes accessing a file
>>What command(s) can I use to see what process(es) are accessing a file
fuser and lsof come to mind.
fuser -u yourfilehere
lsof yourfilehere
Note that lsof is not part of a standard HP-UX install and must be installed separately.
See the fuser and lsof (if installed) man pages for more information.
>>what kind of access they have (read/write, etc)
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.
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.
Say file1 is:
-rwxrwxr-x 1 user1 grp3 123456 Oct 12 08:03 file1
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.
>>can more than one process access a file?
Absolutely!!!!!! It would be hard to be a multi-user operating without that capability!
fuser and lsof come to mind.
fuser -u yourfilehere
lsof yourfilehere
Note that lsof is not part of a standard HP-UX install and must be installed separately.
See the fuser and lsof (if installed) man pages for more information.
>>what kind of access they have (read/write, etc)
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.
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.
Say file1 is:
-rwxrwxr-x 1 user1 grp3 123456 Oct 12 08:03 file1
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.
>>can more than one process access a file?
Absolutely!!!!!! It would be hard to be a multi-user operating without that capability!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2010 06:09 AM
тАО10-12-2010 06:09 AM
Re: processes accessing a file
Lovely. Thank you.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP