setuid question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have written a script which I have set with the permissions of 4755 whose
owner is root and group is root. I am attempting to use it as a way to read
my system logs from a webpage. Obviously the final result will be more
complex, but here is what I got going on


My log file has the following permissions
-rw------- root root		Huge  DATE	log.file

My script has the permissions of 
-rwsr-xr-x root root		small	DATE	test.sh

My web user is www-data 

When I su to www-data and run test.sh I get a logfile permission denied. 

Test.sh is essentially this 

grep "string" /var/log/log.file

My question that make this an setuid question is this. When I make it an
setuid I thought it ran the script as if I am its owner. So like I will
become root run my script and leave. If this is true and root owns the log
file why do I get a permission error

Thanks

Steven Lamb

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux