Weird SUID issue


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Weird SUID issue
# 1  
Old 11-15-2010
Weird SUID issue

Hi,

I am setting up SUID permissions on a binary.
It gets set for most of the users, however, 1 in 10 users is unable to set these.

For those who works:
Code:
> chmod 6555 Test
> ls -l Test
-r-sr-sr-x  1 A   B   5524 Nov 15 14:53 Test

For those where it doesn't work:
Code:
> chmod 6555 Test
> ls -l Test
-r-xr-xr-x  1 C   D   5524 Nov 15 14:53 Test

Permissions are not visible form the program as well confirming it's not a visibility issue.

Thoughts on what could be the problem.
Thanks

Last edited by vbe; 11-15-2010 at 11:20 AM.. Reason: code tags
# 2  
Old 11-15-2010
I would like to know the original value... and what file type, and also directory perms and lying filesystem perms (yes its looks weird...)

Last edited by vbe; 11-15-2010 at 11:27 AM..
# 3  
Old 11-15-2010
Also, what are the mount options for the two different directories. And where the filesystems are mounted from - maybe different NFS servers, maybe they're exported differently?
# 4  
Old 11-15-2010
Please post the output from this command from a good and bad user.


Code:
ls -lisad Test
# If you have "bdf" on you Operating System
bdf .
# Otherwise
df -k .

If any of your "chmod" commands gives an error message, please post the command and the error message.
# 5  
Old 11-16-2010
It's FreeBSD 7.1 & program is a C binary.
The earlier permissions are 555

Good User:
ls -lisad Test
2361939 8 -r-xr-xr-x 1 A B 5524 Nov 16 16:14 Test
df -k .
Filesystem 1024-blocks Used Avail Capacity Mounted on
bng-enghomes001-cf2-2:/vol/home2/homes2 335544320 278167232 57377088 83% /.amd/bng-enghomes001-cf2-2/vol/home2/homes2

Bad User:
ls -lisad Test
27945903 8 -r-xr-xr-x 1 C D 5524 Nov 16 16:13 Test
df -k .
Filesystem 1024-blocks Used Avail Capacity Mounted on
bng-enghomes001-cf1-5:/vol/home5/homes5 880803840 653956752 226847088 74% /.amd/bng-enghomes001-cf1-5/vol/home5/homes5

Figured out something:
It has something to do with the underlying permissions.
In directory where good user was successful, bad user was as well Smilie
And where bad user was unsuccessful, good was unsuccessful as well Smilie

Can somebody help me enterpret these filesystem permissions.
I don't have much knowledge of this.
# 6  
Old 11-16-2010
There's probably a difference in the mounting or sharing options on the two file systems.
# 7  
Old 11-16-2010
Are you user root on this system ?
what are the permissions on the parent directory hosting the Test file ?
Pleade post the result of id command as "your user", as well as for "bad user"
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Weird issue - *ksh script not recognized when being called

HI Team - I'm running into a weird issue when trying to call a .ksh script. In my shell script, I'm using the following command to call my environment file: cd /hypbin/test ./_env.ksh But it's saying not found. Permissions are set correctly, shebang is set but I'm unsure why it's not... (5 Replies)
Discussion started by: SIMMS7400
5 Replies

2. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

3. Shell Programming and Scripting

Weird issue in converting XLSX to TXT

Hi Guys, I have used Perl scripting to convert XLSX file to TXT file using Perl module Spreadsheet::XLSX. I processed one XLSX file having one column and 65k rows of data . Strangely ,It is merging data for every 2047 row and I could see data in TXT file as Ex: Suppose in XLSX file ,if... (2 Replies)
Discussion started by: Rajk459
2 Replies

4. Shell Programming and Scripting

weird equal variable issue

I run this #!/bin/bash cron=$(ps aux | grep crond | grep -v grep | grep -o crond| uniq) echo "cron :$cron:" if ; then echo "OK: crond service running fine on `hostname`" exit 2 else echo "CRITICAL: crond service not running on `hostname`" exit 0... (2 Replies)
Discussion started by: anil510
2 Replies

5. AIX

Weird nfs issue after TL upgrade

We recently upgraded 2 of our AIX 6.1 servers from TL4 to TL5. Both servers are on the same p7 780 frame, installed at the same time from the same image. Both servers are mounting the same nfs share after reboot what worked perfectly fine until the upgrade. Since the patching, one of the two... (5 Replies)
Discussion started by: zxmaus
5 Replies

6. Shell Programming and Scripting

weird issue about h, g, x in SED

I have a file called merge2.t: Hi Hello how are you. </Endtag> <New> I am fine.</New> This is a test. freelong how Here is the SED: sed -n ' /<\/Endtag>/ !{ H } /<\/Endtag>/ { x p } (4 Replies)
Discussion started by: freelong
4 Replies

7. HP-UX

Weird Issue with crontab.

Hello all, Normally I'm pretty comfortable with crontab, changing and updating (done it many-a-time). But in the last two days I've been pulling my hair out over the following... Details of OS: HP-UX mdirect B.11.23 U ia64 2587410573 unlimited-user license Issue: Execute a script (very... (3 Replies)
Discussion started by: Cameron
3 Replies

8. UNIX for Advanced & Expert Users

Weird Awk issue

Hi All, a bit of a weird one here. I'm trying to pass a variable into an awk command, and I keep getting an error. I have the line nawk -F"," -v red=$random_variable '{print $red}' $w_dir/$file_name > $w_dir/${column_name} that keeps failing with the error nawk: can't open file {print... (17 Replies)
Discussion started by: Khoomfire
17 Replies

9. UNIX for Advanced & Expert Users

weird domain issue.

OK so i have a virtual server where i store files. one day i tied to login and i couldn't connect to my sevrer so i logged into my ssh and checked to see if the process was running. proftp was not. I then tried to start it manually and got the error below. Now the domain listed there is not mine... (2 Replies)
Discussion started by: thirddegreekris
2 Replies

10. UNIX for Advanced & Expert Users

Weird SSH issue

hey all, I guess I'm the newbie on these boards, anyways, hello. I recently became the admin for a few Solaris machines, and I have recently discovered an issue with SSH on one of my machines. On one of my machines, I can only SSH into the machine as root. I have tried the newest version... (6 Replies)
Discussion started by: AKM
6 Replies
Login or Register to Ask a Question