Sponsored Content
Top Forums Shell Programming and Scripting Why my SETUID does not work as expected? Post 302960487 by rbatte1 on Monday 16th of November 2015 09:07:42 AM
Old 11-16-2015
Is this script in a non-SUID filesystem perhaps? Have a look at the mount options for the filesystem that the script is in. You can probably get it by:-
Code:
df /path/to/your/script

You can then review /etc/fstab, /etc/vfstab or /etc/filesystems as applicable to your operating system (you don't say which, so these are the most common)

You might also get the same information from the mount command by itself, but this may be OS specific, so I'd be less sure about that.


Does that help?
Robin
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script doesn't work as expected when run on cron

The script checks for free space stats on Oracle. If there are any tablespaces with more than 85% usage it prints the details of the tablespace. If all the tablespaces have more than 15% free space, then "All tablespaces have more than 15 pct free space" must be printed on the screen. When I run... (2 Replies)
Discussion started by: RoshniMehta
2 Replies

2. UNIX for Dummies Questions & Answers

For some reason, my grep doesn't work as expected

I am trying to find only those entries where 7018 and another number appear in the end of the line. 7018 2828 1423 2351 7018 2828 14887 2828 7018 1222 123 7018 1487 I am looking for a way to generate only the last two lines. I was trying to do just "grep '7018{1,5}" but it does not... (5 Replies)
Discussion started by: Legend986
5 Replies

3. Red Hat

/usr/bin/find && -exec /bin/rm never work as expected

hi there, Would you able to advise that why the syntax or statement below couldn't work as expected ? /usr/bin/find /backup -name "*tar*" -mtime +2 -exec /bin/rm -f {} \; 1> /dev/null 2>&1 In fact, I was initially located it as in crontab job, but it doesn't work at all. So, I was... (9 Replies)
Discussion started by: rauphelhunter
9 Replies

4. Shell Programming and Scripting

Parsing XML in awk : OFS does not work as expected

Hi, I am trying to parse regular XML file where I have to reduce number of decimal points in some xml elements. I am using following AWK command to achive that : #!/bin/ksh EDITCMD='BEGIN { FS = ""; OFS=FS } { if ( $3 ~ "*\\.*" && length(substr($3,1+index($3,"."))) == 15 ) {... (4 Replies)
Discussion started by: martin.franek
4 Replies

5. Shell Programming and Scripting

Joining Two Files Does not Work as Expected

Hi, I would like some help with the above awk command. I am trying to use the join command to join two files, no luck. I need to put the second column from file2.txt into each matching field of file1.txt. It works OK up to the value of 1000 of the matching column (1at column in both... (13 Replies)
Discussion started by: yirgacheffe
13 Replies

6. UNIX for Dummies Questions & Answers

sed command does not work as expected

Why when I use this command do I get "E123"? echo NCE123 | sed -n 's/\(.*\)\(\{1,\}\{1,5\}\)\(.*\)/\2/p' But when I used this command, I get NCE123? echo NCE123 | sed -n 's/\(.*\)\(\{3\}\{1,5\}\)\(.*\)/\2/p' I thought \{1,\} would mean any number of characters and \{1,5\ would mean 1-5... (1 Reply)
Discussion started by: newbie2010
1 Replies

7. UNIX for Beginners Questions & Answers

What keeps me from abusing setuid(0) and programs with setuid bit set?

Just learning about the privilege escalation method provided by setuid. Correct me if I am wrong but what it does is change the uid of the current process to whatever uid I set. Right ? So what stops me from writing my own C program and calling setuid(0) within it and gaining root privileges ? ... (2 Replies)
Discussion started by: sreyan32
2 Replies

8. UNIX for Beginners Questions & Answers

Bash script does not work as expected

Repeat this text in a file named notes.txt and run the script Before bash is a good language a blank line appears Also, the following notes are displayed incorrectly What is bad? ================================== Title : Note 1 ================================== Category: Computer Date... (3 Replies)
Discussion started by: cesar60
3 Replies
QUOTAON(8)						      System Manager's Manual							QUOTAON(8)

NAME
quotaon, quotaoff - turn filesystem quotas on and off SYNOPSIS
/sbin/quotaon [ -vugfp ] [ -F format-name ] filesystem... /sbin/quotaon [ -avugfp ] [ -F format-name ] /sbin/quotaoff [ -vugp ] [ -x state ] filesystem... /sbin/quotaoff [ -avugp ] DESCRIPTION
quotaon quotaon announces to the system that disk quotas should be enabled on one or more filesystems. The filesystem quota files must be present in the root directory of the specified filesystem and be named either aquota.user (for version 2 user quota), quota.user (for version 1 user quota), aquota.group (for version 2 group quota), or quota.group (for version 1 group quota). XFS filesystems are a special case - XFS considers quota information as filesystem metadata and uses journaling to provide a higher level guarantee of consistency. There are two components to the XFS disk quota system: accounting and limit enforcement. XFS filesystems require that quota accounting be turned on at mount time. It is possible to enable and disable limit enforcement on an XFS filesystem after quota accounting is already turned on. The default is to turn on both accounting and enforcement. The XFS quota implementation does not maintain quota information in user-visible files, but rather stores this information internally. quotaoff quotaoff announces to the system that the specified filesystems should have any disk quotas turned off. OPTIONS
quotaon -F, --format=format-name Report quota for specified format (ie. don't perform format autodetection). Possible format names are: vfsold (version 1 quota), vfsv0 (version 2 quota), xfs (quota on XFS filesystem) -a, --all All automatically mounted (no noauto option) non-NFS filesystems in /etc/fstab with quotas will have their quotas turned on. This is normally used at boot time to enable quotas. -v, --verbose Display a message for each filesystem where quotas are turned on. -u, --user Manipulate user quotas. This is the default. -g, --group Manipulate group quotas. -p, --print-state Instead of turning quotas on just print state of quotas (ie. whether. quota is on or off) -f, --off Make quotaon behave like being called as quotaoff. quotaoff -F, --format=format-name Report quota for specified format (ie. don't perform format autodetection). Possible format names are: vfsold (version 1 quota), vfsv0 (version 2 quota), xfs (quota on XFS filesystem) -a, --all Force all filesystems in /etc/fstab to have their quotas disabled. -v, --verbose Display a message for each filesystem affected. -u, --user Manipulate user quotas. This is the default. -g, --group Manipulate group quotas. -p, --print-state Instead of turning quotas off just print state of quotas (ie. whether. quota is on or off) -x, --xfs-command delete Free up the space used to hold quota information (maintained internally) within XFS. This option is only applicable to XFS, and is silently ignored for other filesystem types. It can only be used on a filesystem with quota previously turned off. -x, --xfs-command enforce Switch on/off limit enforcement for XFS filesystems (perform quota accounting only). This option is only applicable to XFS, and is silently ignored for other filesystem types. NOTES ON XFS FILESYSTEMS
To enable quotas on an XFS filesystem, use mount(8) or /etc/fstab quota option to enable both accounting and limit enforcement. quotaon utility cannot be used for this purpose. Turning on quotas on an XFS root filesystem requires the quota mount options be passed into the kernel at boot time through the Linux root- flags boot option. To turn off quota limit enforcement on any XFS filesystem, first make sure that quota accounting and enforcement are both turned on using repquota -v filesystem. Then, use quotaoff -v filesystem to disable limit enforcement. This may be done while the filesystem is mounted. Turning on quota limit enforcement on an XFS filesystem is achieved using quotaon -v filesystem. This may be done while the filesystem is mounted. FILES
aquota.user or aquota.group quota file at the filesystem root (version 2 quota, non-XFS filesystems) quota.user or quota.group quota file at the filesystem root (version 1 quota, non-XFS filesystems) /etc/fstab default filesystems SEE ALSO
quotactl(2), fstab(5), quota_nld(8), repquota(8), warnquota(8) 4th Berkeley Distribution QUOTAON(8)
All times are GMT -4. The time now is 08:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy