- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- swapinfo execute permission
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
02-12-2005 09:09 PM
02-12-2005 09:09 PM
swapinfo execute permission
/usr/sbin/swapinfo: Execute permission denied.
I can run swapinfo as alex, but can't run it in the script? If so, how can I calculate swap utilization if I'm not root? (this script should not run as root).
thanx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2005 09:50 PM
02-12-2005 09:50 PM
Re: swapinfo execute permission
-r-xr-xr-- 1 bin bin 24576 Feb 5 2001 /usr/sbin/swapinfo
so you need to be able to execute as bin group, ade alex user to bin group or du a:
chmod 555 /usr/sbin/swapinfo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2005 10:10 PM
02-12-2005 10:10 PM
Re: swapinfo execute permission
-r-xr--r-x 1 bin bin 20480 Nov 9 2000 /usr/sbin/swapinfo
And it still does not explain why can I run it in shell and not in script.
thanx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2005 11:35 PM
02-12-2005 11:35 PM
Re: swapinfo execute permission
I dont know your context, but for some security reason the execution of swapinfo were modified...
Now it can be in your script you have something not set...( PATH seems OK since /usr/sbin/swapinfo shows out). I dont undestand why execution was removed from group bin though...
You could make a copy of swapinfo where youre script is give alex full perms on it, change the name if you wish and see if it works now but dont forget to add its path in the script.
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 03:49 AM
02-14-2005 03:49 AM
Re: swapinfo execute permission
Can you post the script here (from start to the swapinfo call at least) so we can take a look ?
Oz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 03:56 AM
02-14-2005 03:56 AM
Re: swapinfo execute permission
If you don't want root running this script, add logic to the top that forces an exit if the user is root.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 04:03 AM
02-14-2005 04:03 AM
Re: swapinfo execute permission
just to check through your script add
set -x
at the top and trace through the output.
Compare the out put of "env" from the command line and the script for differences.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 04:04 AM
02-14-2005 04:04 AM
Re: swapinfo execute permission
which swapinfo
as you, in shell, not in a script
do you get /usr/sbin/swapinfo ? If not, that would explain your eror, if you have a local copy of swapinfo on your PATH, but not in the PATH in the script, so the script is picking up the 'real' swapinfo which doesn't have world execute permission on it.
As an aside, why do HP do this? If you have world read permissions on the file you can always make a local copy and chmod it, so unless the code is smart and can tell where it is being run from, it's hardly a security feature is it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 04:08 AM
02-14-2005 04:08 AM
Re: swapinfo execute permission
I jut did chmod 555 and it worked, something weird, but the problem is solved.
I did not want to do it, bt had no choise.
Thanx for the replies.