I currently support a shared library which sends direct SCSI commands to| Ted Linnell <edlinnell@acslink.net.au> |
the device that we attach. We present as a hard drive via Fibre Channel to >the client OS, so we are leveraging the scdisk device driver (/dev/hdisk?).
To differentiate between our 'pseudo' disk and other disk devices, we >initiate a SCSI conversation, using SCSI_INQUIRY - and send via ioctl().
On AIX that is the DK_PASSTHRU specific ioctl.
When running as root, all is just fine.
Unfortunately there are times when the shared library is loaded by a
non-root process - at which point, the same ioctl() call fails with EACCES. >Making the binary that loads the shared library setuid root works, but is
not an option.
We have tried changing owner on our /dev/hdisk entry.
We have tried altering the permissions to 666 on our /dev/hdisk entry
We have tried acledit to give the userid rw- permissions.
All have resulted in the same EACCES error.
Has anyone solved this problem - or have suggestions on how to get around
it?
Thanks in advance,
jerry
Jerry Heyman
Principal Software Engineer
Dell EMC
Jerrold.Heyman@emc.com ==============================================================
Have you looked at using sudo to allow selected users to run the
required command(s) as root..
dramigan@gmail.com wrote:
I currently support a shared library which sends direct SCSI commands to >the device that we attach. We present as a hard drive via Fibre Channel to >the client OS, so we are leveraging the scdisk device driver (/dev/hdisk?).
To differentiate between our 'pseudo' disk and other disk devices, we >initiate a SCSI conversation, using SCSI_INQUIRY - and send via ioctl().
On AIX that is the DK_PASSTHRU specific ioctl.
When running as root, all is just fine.
Unfortunately there are times when the shared library is loaded by a >non-root process - at which point, the same ioctl() call fails with EACCES. >Making the binary that loads the shared library setuid root works, but is >not an option.
We have tried changing owner on our /dev/hdisk entry.
We have tried altering the permissions to 666 on our /dev/hdisk entry
We have tried acledit to give the userid rw- permissions.
All have resulted in the same EACCES error.
Has anyone solved this problem - or have suggestions on how to get around >it?
Thanks in advance,
jerry
Jerry Heyman| Ted Linnell <edlinnell@acslink.net.au> |
Principal Software Engineer
Dell EMC
Jerrold.Heyman@emc.com ==============================================================
| |
| Nunawading, Victoria , Australia | ==============================================================
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 348 |
Nodes: | 16 (2 / 14) |
Uptime: | 89:13:17 |
Calls: | 7,609 |
Files: | 12,783 |
Messages: | 5,681,104 |