Sample Header Ad - 728x90

How to create a directory behalf on root user?

3 votes
0 answers
30 views
I have a script: [postgres@LaHarch ~]$ cat mkrundir.sh #!/bin/bash mkdir /run/postresql With attributes: [postgres@LaHarch ~]$ ll mkrundir.sh -rwsr-sr-x 1 root root 74 Aug 26 18:53 mkrundir.sh But when I run it I get: [postgres@LaHarch ~]$ ./mkrundir.sh mkdir: cannot create directory '/run/postresql': Permission denied Why SUID didn't help me? And what is best practice for such a task?
Asked by Артем Максимов (31 rep)
Aug 26, 2019, 05:03 PM
Last activity: Aug 26, 2019, 05:16 PM