|
-
September 6th, 2004, 11:05 AM
#1
SUID problems - Any Ideas
I have a configuration file on my FC1 epos system that I don't want the general 'epos' user to be able to write to - Hence its root:root 644 (rw - root - r to group and r to everyone else).
However I need an application which is run by the general user 'epos' to be able to write to the file - increment a report number counter.
The obvious solution it would seem to me was to chmod +s the application.
However, the application is written in kylix and needs a couple of environment variables to be set (LD_LIBRARY_PATH & LANG) to operate and so when the SUID report application is run it runs under the root user and doesn't have these ENV variables set.
I have tried chmod +s the shell script that sets these variabes, but it seems that you a SUID script doesn't actually run with SUID permissions - a simple example demonstartes this:
test.sh:
Code:
echo hello > test.file
chown root:root test.sh
chmod 755 test.sh
chmod +s test.sh
su - epos
./test.sh
and
ls -l test.file
shows ownership to epos
I've tried putting the ENV variabls into /etc/bashrc - which doesn't seem to work either.
Does anyone have any another suggestions?
Steve
IT, e-commerce, Retail, Programme & Project Management, EPoS, Supply Chain and Logistic Services. Yorkshire. http://www.bigi.uk.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|