I'm using virtual file-system in /proc/ to print out current working directory (CWD):
Code:
ls /proc/$PID/cwd # part of an argument to printf (full printf below)
Now, some processes complain about SUDO privileges (e.g. init: ls: cannot access /proc/1/cwd: Permission denied).
Is it possible to know beforehand if action/command will require SUDO?
I'm trying to trigger a reload of the nginx master process by using pkill and sudo.
The server reloads fine, but I was just curious if anyone knows why the command `sudo pkill -HUP -f "nginx: master process" returns code 129.
# Running as root
$ pkill -HUP -f "nginx: master process"
$ echo $?
# Output is as expected:
0
# Running as a user (sudo is set to not prompt for a password)
% sudo pkill
Hello, I have a regular user account that needs to run a script as a cron job. This script is to check whether or not a file exists, and if so, perform an action on that file using sudo (the file is owned by root).
Hi all, I tried the method mentioned by harlekin and it works. The website that I googled describing this is:http://www.shellperson.net/using-sudo-with-an-alias/Just make sure you have the space in "sudo ".
Possible Duplicate:
Redirecting stdout to a file you don’t have write permission on
I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint.
If I go to /opt and do a $ echo hi > file it says permission denied.
If I try with sudo, like this $ sudo echo > file it says permission denied.
Isn't sudo to execute the command as superuser?
Hello guys, first of all, im so sorry to create another topic regarding that card, but i can't see answers to my problem.
Im trying to install the awus36h on BT5 R3, i will quote the command i have used:
Code:
cd /tmp
sudo cp /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist_orig.conf
echo "blacklist rtl8187" | sudo tee /etc/modprobe.d/blacklist_rtl8187.conf
echo &qu
Hi, Have a need to run the below command as a "karuser" from a java class which will is running as "root" user. When we are trying to run the below command from java code getting the below error.
Command: sudo -u karuser -s /bin/bash /bank/karunix/bin/build_cycles.shError: sudo: sorry, you must have a tty to run sudo
Your help will be much appreciated.
thanks
Hi All,
I am facing problem running a script which triggers another script in multiple remote servers.
this is ouput of : strace sudo rc.d restart tor > tor.log 2>&1there are some "open" "access" "no such file directory" but i can not understand what kind of information it give.can you make a parse?i downgraded which packages were upgraded with --ignore flag.