The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
19 views

Why does ping require the setuid bit?

In the Jessie version for the Raspberry Pi, ping requires the setuid bit to be set. What is the rationale for this?
0
votes
0answers
38 views

Android / linux ignores setuid flag

I am trying to get root access to my chinese x86 tablet. With adb I have root. I copied a "sh" binary and set setuid bit, and from adb it works as expected: 1|shell@x98air3g_c5j8:/ $ which su.sh ...
0
votes
0answers
37 views

How can I wrap a sensible text file with a Bash script that allows every user to grep for $USER?

So I have a file data.txt that stores user name and some piece of data, one line per user. I'd like to have a Bash script that is runable by the users and allows them to call grep -w "^$USER" ...
1
vote
0answers
24 views

Setuid bit for root is set but real user id is not 0

My program permissiontest has the following privileges: -rwsrwxrwx 1 root root 8664 Nov 18 15:59 permissiontest It consists of the following code when being run as non-root user: #include ...
0
votes
1answer
16 views

Group of a user when running a setuid executable

If a user, user1 belongs to group1 and also a setuid executable exists that is owned by user1 and group, group2. user1 is not a member of group2. I am seeing that the executable cannot access files ...
0
votes
0answers
40 views

Downgrade from one non-superuser to another?

So I have a master process running as, say, user. I want user to spawn child processes under users named subuser1, subuser2, and subuser3. I can do any configuration under root needed, etc, as well ...
0
votes
0answers
153 views

Linux User Groups and process GID

How are groups and gid permissions related? Here is a little test that has me stumped. I create a test user with uid=2001, and also a group with gid=3000 and add the user to that. Running as my ...
1
vote
1answer
95 views

Prompting for sudo password in a setuid root binary

I have a setuid root binary, with_sudo.bin, with the following source code: /* with_sudo.c */ #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> ...
0
votes
1answer
106 views

Linux setuid programs/files

how to find files based upon time information, such as creation, modified and accessed. It is useful to find files before a certain time, after a certain time and between two times. what command in ...
0
votes
2answers
46 views

followup: why are shebang files not suid-able?

followup question to http://unix.stackexchange.com/questions/364/allow-setuid-on-shell-scripts . there is a very good answer by Gilles. alas, I do not understand it. nothing described there seems ...
1
vote
0answers
150 views

Strange behaviour for setuid and setgid

I am doing a small experiment with special privilege bits as follows: [root@localhost~]# useradd user1 [root@localhost~]# cp /bin/touch /home/ [root@localhost~]# chown user1:user1 /home/touch ...
0
votes
2answers
518 views

Why my setting with NFS and setuid not working in Linux

I'm using Linux. On machine A I have such NFS setting in etc/exports: /home 10.0.129.130(rw,no_root_squash) I mount this directory on machine A on /home/nfs/ on machine B. And I've set setuid using ...
0
votes
1answer
108 views

Setuid command seems to not working

I had windows application installed on Linux Mint computer, for example, in Demo directory. And in Demo folder, I have files directories structure as follow -rwxrwxrwx spuser spuser aaa.dll ...
1
vote
1answer
448 views

Developing and deploying application that will run as root using setuid?

I have an application that needs to run with root permissions. Using setuid bit on the application file seems like a logical choice. My understanding of setuid is that the files should be owned by ...
2
votes
0answers
360 views

How to run php script (via web server) as different user under Mac OS X

I'm trying to call an executable from a PHP script that needs to be run as a different user (NOT root) than the web server normally runs as. I thought it should be sufficient to just set the setuid ...
1
vote
1answer
120 views

Is it possible to upload setuid-set file to ftp-accessible directories?

Just curious, is it possible to upload files set with setuid permission to directories using ftp and retain its setuid permission? Or does FTP always change the permission?
21
votes
2answers
33k views

Can I make a script always execute as root?

How to make a script execute as root, no matter who executes it? I read about setuid but I'm not sure how to do this. I'm using Linux, Ubuntu 12.04 LTS.
1
vote
3answers
123 views

Do all my programs have owner rights to all my files?

I'm worried about all my programs having full access to all my files. Eg: My user is 'john'. I install some program, say Dropbox. Dropbox runs as 'john'. Therefore it not only has full rights on its ...
2
votes
1answer
409 views

What's to stop somebody from creating a setuid-root script on a flash drive, then putting it into another person's computer and getting root access?

What's to stop somebody from creating a setuid-root script on a flash drive, then putting it into another person's computer and getting root access? I assume there's some kind of protection against ...
8
votes
7answers
19k views

How to run a program as root without “sudo”?

I have a certain binary program on OS X that can only be run as root. I'm tired of prepending sudo each time I invoke it and typing the password, and would like it to automatically run as root when I ...
1
vote
1answer
2k views

Strange strace and setuid behaviour: permission denied under strace, but not running normally

This is related to this question. I have a script (fix-permissions.sh) that fixes some file permissions: #! /bin/bash sudo chown -R person:group /path/ sudo chmod -R g+rw /path/ And a small c ...
1
vote
2answers
1k views

Allow user to execute a shell script without seeing its contents?

I'd like to have an hg hook that sends email using a gmail account. Obviously I don't want anyone to be able read the email-sending script except me or root, since it has a password in, so here's what ...
113
votes
8answers
49k views

Running upstart jobs as unprivileged users

What's the canonical way to have an upstart job change its userid and run the script as an unprivileged user? Obviously one can use su or sudo, but this seems hacky (and can generate needless log ...