Questions tagged [setuid]
38 questions
9
votes
1 answer
Why is chroot system call not available to non root user?
I was reading description about setuid on wikipedia
http://en.wikipedia.org/wiki/Setuid
I was unable to understand how chroot is related to setuid as mention in following paragraph from wikipedia
The presence of setuid executables explains why the…
Mr Coder
- 195
9
votes
4 answers
Set uid for windows
Is there an equivalent of set uid for windows(XP)? The 'run as' option requires admin password each time it runs. I want users to be able to run that particular executable without knowing admin password. I'm very much new to windows area. :(
Akilan
- 419
6
votes
5 answers
(Ubuntu) setuid bash doesn't work
Here is the code:
(root:)
# mkdir /test
# cp /bin/bash /test/sbash
# chmod a+s /test/sbash
(user1:)
$ cd /test
$ ./sbash
$ mkdir trycreate
mkdir: cannot create directory `trycreate': Permission denied
And bash scripts with setuid bit set not…
Lenik
- 832
6
votes
4 answers
sudo: must be setuid root (Mac OS X)
I ran
$ sudo chown -R $USER /usr/bin
and now when I try to run programs under the /usr/bin path as sudo I get
sudo:must be setuid root
What should I do if I would like to revert the chown?
jerome
- 193
6
votes
3 answers
sudo or acl or setuid/setgid?
for a reason I do not really understand, everyone wants sudo for all and everything. At work we even have as many entries as there are way to read a logfile (head/tail/cat/more, ...).
I think, sudo is defeating here.
I'd rather use a mix of…
Xavier Maillard
- 201
5
votes
1 answer
How do you run a PHP script as the file's owner, rather than as the webserver user?
I'm sure there's a well-known answer for this, but I can't seem to find it.
How do I make a user's PHP scripts (in ~user/public_html, for example), run as the owner rather than as (eg) www-data?
Assume Apache, Linux, and PHP 5.
jes5199
- 377
5
votes
1 answer
Linux 2.6.32 Centos 6.4 setuid() fail / security changes?
After recently updating to CentOS 6.4, two machines have setuid() restrictions which act like either capabilities or selinux, however both are disabled. E.g. the following fails:
[root@host statd]# perl -e 'use POSIX;…
Patrick
- 61
5
votes
1 answer
How can I use SetUID on a shell script to run as a non-root user?
Our company's server is running Ubuntu 12.04 (Precise) and Apache 2. We have a custom, internal web application installed. I have a bash script which pulls any updates to that app from source control to the server. Only one user on the system (the…
Jazz
- 153
4
votes
3 answers
Cannot write to CIFS share as non-root user - CentOS 6
I'm working on a system recently migrated to CentOS 6 from CentOS 4.9. There is a CIFS mount from a Windows 2008 server that existed on the old system. The raw mountpoint has 777 directory permissions.
[root@Bootylicious ~]# ls -ld…
ewwhite
- 201,205
3
votes
3 answers
What's the safest way to kick off a root-level process via cgi on an Apache server?
The problem: I have a script that runs periodically via a cron job as root, but I want to give people a way to kick it off asynchronously too, via a webpage. (The script will be written to ensure it doesn't run overlapping instances or such.)
I…
MartyMacGyver
- 167
3
votes
2 answers
Upload only SFTP with OpenSSH and Linux?
I'd like to set up a chrooted SFTP server with upload only privileges.
Back in the day, I know I've done this with FTP on FreeBSD through the use of SETUID. All uploaded files were automatically owned by root with others having write only…
PunchMonkey
- 101
- 1
- 4
3
votes
1 answer
When is appropriate to remove setuid/setgid privileges from an app?
I've been skimming through the NSA suggestions for hardening Mac OS X and Linux and noticed this little tidbit of info:
Setuid programs run with the privileges of the file's owner (which is often root), no matter which user executes them. Bugs in…
Tom
- 3,303
3
votes
4 answers
Mapping UIDs for NFS
I have a Mac OS X file server that serves via SMB/CIFS and AFP. The server is a domain client via the golden triangle approach, but this results in a very large UID for the users. This is fine for my current setup, but I'd like to get NFS working…
churnd
- 4,237
3
votes
1 answer
Selective setuid root or running an application as root ? (web server/cgi context)
Well we have an in house server manager (like Webmin, only more specific), comprising of a bunch of C CGI programs and CGI Perl scripts, some of which require root privileges (adding system users, managing passwords, dealing with mail queues etc. )…
Mohit Chawla
- 486
2
votes
1 answer
Running a shell script with its owner's privileges
On a Debian (5.0.3) server I have a user svnsync who owns a certain shell script:
-rwsrwsr-x 1 svnsync users 119 Dec 21 13:45 mirror-svn.sh
I'd like everyone in the users group to be able to execute this script with svnsync's privileges. This is…
Jonik
- 3,121