Questions tagged [setuid]

38 questions
2
votes
1 answer

Is the following setuid program a security risk?

I have the following program in .c set as setuid chmod only read/execute by owner and will set it immutable, as i will the php script it invokes. #include #include #include #include int main(int argc,…
n00b32
  • 199
  • 10
2
votes
1 answer

Amazon EC2 Ubuntu and upstart logging permissions

I have set up this upstart script on a Amazon Ec2 Ubuntu 12.04 TLS instance for executing a node.js application. The script uses setuid and setgid. It works fine without using setuid and setgid but when I use them if fails because the process can't…
2
votes
1 answer

How to start/stop service with Apache2 on Ubuntu

Using Apache, I'd like to be able to start and stop a service on the same server. Essentially, I'm looking for a way to allow Apache (or some script called by Apache) to call sudo service XXXX start. I realize there are severe security implications…
user142512
  • 23
  • 2
2
votes
0 answers

checksecurity / setuid changes, is this a bug or did somebody break in?

I received a mail by checksecurity from my ubuntu 12.04 server with the following content: --- setuid.today 2012-06-03 06:48:09.892436281 +0200 +++ /var/log/setuid/setuid.new.tmp 2012-06-17 06:47:51.376597730 +0200 @@ -30,2 +30,2 @@ - 131904 …
Fabian Zeindl
  • 239
  • 1
  • 3
  • 10
2
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,213
  • 2
  • 20
  • 19
2
votes
2 answers

Adding a new user into linux from a script

I am using a customized Redmine installation to manage projects. I have managed to hook the addition of new users and send the login information to a bash script I have. Below is my script: #!/bin/sh UNAME=$1 UPASS=$2 wall "$UNAME $UPASS" useradd…
Joshua Enfield
  • 3,454
  • 8
  • 42
  • 59
2
votes
1 answer

How to give partial user access to systemctl without sudo/su/root

I'm a bit new to this, so I'm not sure where to look. I have access to a server that as a command that executes a limited version of systemctl, and I want to expand it. The command acts as follows: It allows specific users without sudo rights to…
1
vote
2 answers

Apache Per-user web directories under user's own ID instead of www-data?

Talking about this feature http://httpd.apache.org/docs/current/howto/public_html.html Is there a way (HOW?) to have Apache take on (setuid) the ID of each "~user", instead of doing everything under the www-data userid? There is a related question…
Alex R
  • 1,063
  • 3
  • 14
  • 29
1
vote
1 answer

SETUID / SETGID on a binary executable stopped working following upgrade of Fedora Core

I have a C program that needs access to a protected directory full of stuff.strong text The idea is that only the program or the administrator have access. In the past on Linux platforms, I've used the file-system SETUID and SETGID bits rather…
Richard T
  • 1,206
  • 12
  • 29
1
vote
1 answer

Unable to su into any user

After I have fiddled with the folders /usr/bin, /usr/lib and /usr/lib64 I restored them, but was not able to su into root (and probably other accounts too): Permissions on the password database may be too restrictive This error shows only for…
1
vote
2 answers

SETUID Permission Denied

I have been learning Linux from few days, and now I was trying to learn the advanced file permissions like setting UID, GID and sticky bit. At root I have first changed the ownership of directory to Pavan and g1 group, then, done…
surpavan
  • 157
  • 1
  • 8
1
vote
4 answers

How to make default owner for all files and directories in folder

I want all new files created in one folder to have an owner called user1 How can I do that?
John
1
vote
0 answers

RHEL8 Limits not applied when setuid is configured

I have configured my limits.conf file to allocate a huge stack size * soft stack 65535 * hard stack 65535 ulimit -s shows the correct value for both root user and myuser With this configuration in place, if…
Sam Daniel
  • 111
  • 3
0
votes
1 answer

Sticky bit enabled Script can't write to a root file

I have 2 files in the /tmp/. The first one is an empty file named "file" with permission -rw------- and owner root:root. The second file is named "script" which is a simple Ruby script with permission -rwsr-xr-x and owner root:root. The contents of…
15 Volts
  • 277
  • 1
  • 3
  • 9
0
votes
3 answers

Is there a way to allow an apache2 logged in user to access a specific directory dynamically?

This is surprisingly a very difficult problem to solve. I want to allow my Linux users to login to Apache2 and have access to their own directory(ies) only. I've managed to get Linux users to authenticate to Apache2 using PAM and that works…
CaesarS
  • 111
  • 1