1
vote
0answers
58 views

Limit program execution to a list of arguments

I would like that my Unix users can only run a specific command insecurecommand with a controlled list of arguments stored in a file. The only solution I have found at this time is to : Create a ...
5
votes
2answers
224 views

Group memberships and setuid/setgid processes

Processes which de-escalate privileges via setuid() and setgid() do not seem to inherit the group memberships of the uid/gid they set. I have a server process that must be executed as root in order ...
3
votes
1answer
155 views

How to let a user execute a script owned by root? Setuid doesn't seem to work anymore [duplicate]

I have some bash scripts that I use with the user 'root' to manage iptable rules. The problem is that I want these things at the same time: The script must be owned by root Permissions must be 700 ...
3
votes
2answers
80 views

set umask (permissions) similarly as setgid on a directory

I know how to use setgid on directories, to enforce that whole directory structure has uniform user:group ownership. Is there a similar way to set the umask for a directory, so that the whole ...
6
votes
3answers
192 views

Under what scenarios would I want to set a SUID bit?

I'm struggling to wrap my mind around the concept of SUID bits and why they're would be useful. For example, let's say I have a program: -rwsr-xr-x 1 root root 12364 Jan 12 2013 ...
2
votes
0answers
45 views

LXC: Have rootfs mounted without nosuid

I have the container's rootfs in a volume mounted with the nosuid option. When I start the container, its / mounted is then also mounted nosuid, which breaks programs such as sudo. How can I avoid ...
1
vote
1answer
757 views

How to suid iwconfig on Debian wheezy?

I have a script running under my own user account that takes care of all sorts of wireless interfaces. It (more or less) intelligently switches wireless LAN off and on and so forth. However, it does ...
2
votes
1answer
211 views

How to set up a script to run as root non-interactively?

I need to set up the following script to run as root whenever I log in: #!/bin/zsh truncate -s 0 ~yourstruly/.juniper_networks/network_connect/ncsvc.log I know how to run the script as root ...
4
votes
1answer
411 views

Clear setuid permission using numeric mode

On an Ubuntu Linux I have a directory with the setuid bit set (drwsr-xr-x) which I want to unset. Neither chmod 755 nor chmod 0755 nor chmod 00755 (I though maybe the first 0 is interpreted as just ...
2
votes
2answers
516 views

setuid and setgid confusion

I'm trying to fully grasp the concept of setuid and setgid, and I'm not quite sure in what way permissions are actually elevated. Let me provide an example: Users userA (groups: userA groupA) userB ...
3
votes
1answer
151 views

Running setuid binary temporarily without setuid?

Currently setting up xpra, which wants to run an X instance as non-root using the dummy driver, but the system Xorg binary is SUID. Since the system auto-updates, I would prefer not making and ...
3
votes
3answers
5k views

What does GID mean?

What does GID actually mean? I have Googled it and this is what linux.about.com said: Group identification number for the process. Valid group numbers are given in /etc/group, and in the GID field ...
2
votes
1answer
559 views

using Set uid to run a root command from non-root user

Consider the following two files. summarize's executable UID bit has been set, so that another user belonging to another group can execute the summarize executable that uses the customers.dat file. ...
2
votes
2answers
391 views

Unix executable file permission vs runtime user's permissions

I have heard that it is good practice to run an executable as a user with a completely different privilege set than the owner of the task. In fact I heard that it is best to run it as a different user ...