1
vote
3answers
100 views

Unable to use sudo su - command

I am new in ubuntu, i am trying to run following command sudo su - Bu i am getting following message sudo: unable to open /etc/sudoers: Permission denied sudo: no valid sudoers sources found, ...
3
votes
1answer
53 views

Why does redirection fail when passing through ssh, sudo and sh?

After reading this question, I know that I have to do sudo sh -c 'ls -hal /root/ > /root/test.out' to avoid the "Permission denied" error. But when I do ssh hostname sudo sh -c 'ls -hal /root/ ...
1
vote
1answer
76 views

how to correct sudo permission

I'm running AWS EC2 Micro instance and had issues getting permission to the root access with EC2-user. Followed a tutorial online and ran the following commands: sudo chgrp ec2-user /etc sudo chmod ...
0
votes
3answers
314 views

Execute a command with root permissions as normal user

I want to execute a command as if I am my normal user, but I want to have root certain permissions. In particular, I have created a phyiscal VirtualBox drive that I want to use as a normal user. I ...
1
vote
2answers
340 views

Does sudo really make you root for a little while?

On Linux, in what kind of situations, if any, running a command as a non-root to access a file/folder or create/delete a file/folder using sudo may result in "permission denied" while running the same ...
3
votes
3answers
730 views

Lost permission to use sudo commands

I changed /etc folder permission to 711. After doing that, I lost the permission to use sudo commands. Any way to change the folder permissions back? What I have tried so far: 1) use su -, ...
1
vote
1answer
222 views

Playing sound on server using php

I want to play a sound file on my server using PHP. The PHP script is called by Apache and runs under the user 'nobody', which has by default no access to the speakers. So I created a new user ...
0
votes
1answer
867 views

Permission denied in Amazon EC2 while accessing tomcat7 folder

I am trying to copy a log file from a Amazon EC2 instance to my local machine (Windows 7). I am using WinSCP438 which is able to connect to the remote server i.e Amazon EC2 instance. I am trying to ...
0
votes
2answers
397 views

How do you create a user with read and write access to another user's home directory

I am new to Linux and need some help how I can create a user with some special rights. I have read a few articles and "how Linux permissions work" but have not yet understood how it works in ...
0
votes
2answers
259 views

Have sudo create files under your own user id?

If I wanted to do something like sudo fdisk -l > test.txt but I wanted test.txt to be under my own user ID (and not root) without having to chown it afterwards, is there a way to do this? ...
2
votes
1answer
118 views

Unix User Group or Sudo/Su

I am in a situation where I have to chose between unix user groups or sudo to tackle an issue. To give some background, A Linux app is installed as user X. The installation copies some scripts and ...
1
vote
1answer
482 views

Is there a good way to give ec2-user admin credentials on EC2? I'm sudoing too often

Disclaimer: I'm only decent with EC2 and Unix commands / Linux administration. Question: How do you give ec2-user the same permissions as root? I'm tired of sudoing. Why? I found out that you have ...
0
votes
2answers
5k views

“no valid sudoers sources found, quitting” error while chmodding /var/www

I'm new to Ubuntu and just installed LAMP. I'm trying to paste files into the /var/www/ directory so i can test my PHP projects, but I can't. I have searched on the web and all I read is: "type sudo ...
0
votes
0answers
208 views

How can I make it easier to move files from an underprivileged (user) account to a root directory in linux?

I'm sure it's been asked and answered many times, but I can't seem to find an answer. Maybe this question will link someone else to the right answer. Here's the problem: ~$ sudo ls ls: ...
2
votes
2answers
865 views

Permissions: Why do I always have to type 'sudo' before every command?

I'm editing theme files in a wordpress site owned by www-data:www-data as my main user 'oma'. Every time I create a file or edit one, I have to use the sudo command and it gets created as root:root. ...
1
vote
1answer
560 views

Secured bash history usage

I know all commands user sends to server are automatically logged into ~/.bash_history I want to give access to my PC to my colleague (I've already gave hime some limited access to use sudo via ...
8
votes
5answers
7k views

sudo chmod -R 777 /

sudo chmod -R 777 / I did this. It was a mistake. Is there any way to undo it? Basically it's messed up more things than I can list. I don't have time-machine enabled on my mac.
2
votes
1answer
893 views

sudo midnight commander

I sometimes start midnight commander as superuser with the command sudo mc to do some operations on the current working directory as superuser. But this results in ~/.mc having the wrong ...
1
vote
1answer
510 views

Using pscp and getting permission denied

I'm using pscp to transfer files to a virtual ubuntu server using this command: pscp test.php user@server:/var/www/test.php and I get the error permission denied. If I try to transfer to the ...
1
vote
2answers
806 views

need to run chgrp as root on ubuntu

I need git user to run chgrp -R www-data linode.git/ chmod -R 770 linode.git/ as root. Only these two commands and only for git user. How can I do that?
4
votes
1answer
892 views

How can I use sed in /etc/apache2/sites-available?

I'm attempting to write a script that uses sed to copy the default file for apache and writes a new file, replacing /var/www ($DOC_ROOT below) with my own directory, $NEW_SITES_DIR. However, sed isn't ...
1
vote
1answer
1k views

localhost in sudoers

There is no chance of an internal attack, so I would like to give sudo privileges to users at the local computer using sudoers. I tried these lines separately: %admin localhost=(ALL) NOPASSWD: ALL ...
3
votes
2answers
3k views

fine-grained sudoers configuration (allowed commandline arguments)

is there a straight-forward way to allow a user to run (for example) /usr/bin/pacman -S -u as root, without allowing him to run /usr/bin/pacman -S -u some_package ? The line user ALL=(root) ...
1
vote
3answers
3k views

sudo equivalent configuration on Solaris 10

I am looking to configure on Solaris 10 to achieve the below: user=jon group=jtu jon is owner of /opt/app user=ken group=jtu ken is owner of /data On Linux I have added the below line %jtu ALL= ...
3
votes
2answers
1k views

“username” is not in the sudoer list - how do I get back in there

I use Ubuntu 9.10 I changed my password. After I restarted my machine and tried to do sudo whatever... I got "username" is not in the sudoer list. What should I do to get back in there?
4
votes
5answers
11k views

How to reset folder permissions to their default in Ubuntu 9.10?

I recently typed the command sudo chmod 777 -R / after that some things like sudo -i are not working normally. So I am wondering if there is any way I could reset the folder permissions to their ...
2
votes
5answers
3k views

Problem with running a script at startup as root?

The main question: Is there a way I can run 'completely' one of my script when ubuntu's desktop appears no matter if root , administrator, desktop user or an unprivileged user logged in? What does ...
5
votes
5answers
3k views

How do I tell sudo to write files with a umask of 0022?

I recently upgrading to Snow Leopard. I have noticed that some files written by MacPorts are installed with the wrong permission -- they are written with a umask of 0077. I think I have narrowed down ...
5
votes
3answers
920 views

Logged in to vi, made changes, forgot to sudo first - now what

I made lengthy changes to a configuration file on a Ubuntu Linux computer with the vi editor. Unfortunately, I forgot to sudo first, so now I'm in the editor, but can't save my changes because of ...
2
votes
5answers
171 views

Creating a group in trying not to use Sudo nor 777

How can you create a group such that I can use programs of another user in the PC in my user account without 777 permissions nor with sudo? I created a new user by sudo adduser masi. I need either to ...