User Id
Posted in 1999
Topics: Server Administration, Security, Permissions & Auditing, Migration, Import/Export & Data Conversion
Hi, I wrote a perl script that changes the user id and group id to a different user to unload, delete, and upload new tables into my informix database. I'm not really sure why, but I can use the script with no issues, but when another user uses it, it fails on the delete table procedure. The script is owned by root and the the permissions are set to "-rwsr-xr-x root other". The permissions on the database are set to grant connect to public and the user id the script whiches to is set to grant dba to xxxx. I don't think the changing of the user id is really working, but when I unload files from the database, it shows that its owned by the user id I switched to. I changed the user id and group id like: $< = 190; $> = 190; $( = datagroup; $) = datagroup; Any help would be appreciated. Thanks in advance... Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
mr_potato_head@my-deja.com wrote: > I wrote a perl script that changes the user id and group id to a > different user to unload, delete, and upload new tables into my > informix database. I'm not really sure why, but I can use the > script with no issues, but when another user uses it, it fails on > the delete table procedure. The script is owned by root and the > permissions are set to "-rwsr-xr-x root other". The permissions > on the database are set to grant connect to public and the user id > the script whiches to is set to grant dba to xxxx. I don't think > the changing of the user id is really working, but when I unload > files from the database, it shows that its owned by the user id I > switched to. I changed the user id and group id like: > > $< = 190; > $> = 190; > $( = datagroup; > $) = datagroup; > > Any help would be appreciated. Thanks in advance... For hysterical raisins, Informix always uses the real UID and not the effective UID to identify the user who is connecting to the database. Since you are likely to be setting just the effective UID, that would be why the files are owned by the new user, but why the database connection fails -- only root processes can set the real UID to an arbitrary value. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>