I made a group called "group1" and I want to give it all sudo rights only except "chmod, chown" commands. How can I change below sentence to get through this?  Before applying change:  %group1 ALL=(ALL) NOPASSWD:ALL
53147
I don't need an administrator to change my root password. I don't want any sudo user to execute this command:  sudo passwd $root   I have tried it in the sudoers file using the following command:  %sudo ALL=(ALL) ALL, !/usr/bin/passwd $root   How can I block it?
9456
I accidentally changed /var owner/group to my username and then changed it back to root, but not all the /var folders' owners are root, so is there anyway to change back owner/group of files/folders to default state?  Or at least those files/folders that are created by packages?
65241
After running this command - sudo chown -R $(whoami) usr/{lib/node_modules,bin,share} I am not able to run sudo anymore: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set. How do I fixed that?  I read  but I am not sure what advice to follow and if it's applicable to my case.
74000
My /etc/sudoershas content:  Defaults        env_reset Defaults        mail_badpass Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  # See sudoers(5) for more information on "#include" directives:  #includedir /etc/sudoers.d   There is no rule above specifying NOPASSWD. I was wondering  why user root seem to be able to execute any command as any user without providing password?  Thanks.
68265
I'm looking for a good, consistent and easy way to do a report of sudoers permissions for every user and group on the system. For users, I want the report to include permissions granted via group membership.
86842
I want to have a root privileges on some directories. How can I do this?
64625
I'm trying to not give 777 permission in my /var/www/html folder, but I want to edit my files without sudo. So I though in create a symlink of a folder in my home directory within /var/www/html. I created it using sudo ln -sT /home/andre/www/moodle/ moodle , and the ls -la output is this:  andre@andre-270E5G:/var/www/html$ ls -la total 8 drwxr-xr-x 2 root root 4096 Mai  4 10:20 . drwxr-xr-x 4 root root 4096 Abr 29 14:29 .. lrwxrwxrwx 1 root root   23 Mai  4 10:20 moodle -&gt; /home/andre/www/moodle/   So, my moodle folder has read, write and execute permissions for everyone, and thats not what I want. I used the command sudo chmod -R 775 moodle/ trying to change it, but it stayed with read, write and execute permissions to all. I tried the same with the moodle folder in /home/andre/www/moodle, but it stayed the same. The output of ls -la in /home/andre/www/ is:  andre@andre-270E5G:~/www$ ls -la total 28 drwxrwxr-x  3 andre andre  4096 Mai  4 10:02 . drwx------ 49 andre andre 20480 Mai  4 10:01 .. drwxrwxr-x 41 andre andre  4096 Mai  4 10:02 moodle   So the folder moodle in /home/andre/www/ has the permissions I want.  As an additional problem, when I access localhost/moodle I get 403 Forbidden error.  What am I doing wrong here?
123578
To backup the "/home" directory tree of a server, I've created a 'backup' account and used setfacl to make the whole directory readable by it. My cron job runs this command as root each night:  setfacl -R -m u:backup:rx,d:u:backup:rx /home   Great, except for one problem: whenever I run this command, it changes the group permissions of my ssh key.  me@myserver:~/.ssh$ ls /home/me/.ssh/id_rsa -l -rw-r-x---+ 1 me me 1679 Jan  8 18:35 /home/me/.ssh/id_rsa   Well, this causes my ssh program to barf because it is now group readable. Strangely, getfacl disagrees with the permissions.  me@myserver:~/.ssh$ getfacl /home/me/.ssh/id_rsa getfacl: Removing leading '/' from absolute path names # file: home/me/.ssh/id_rsa # owner: me # group: me user::r-- user:backup:r-x group::--- mask::r-x other::---   getfacl thinks the file is not group readable. If I run the obvious command  chmod 400 id_rsa   the permission is fixed, but reverts every time I re-run the original command (setfacl -R -m u:backup:rx,d:u:backup:rx /home). What's going on?  Note: I do want my id_rsa to backup up, so let's not worry about those security implications.
119526
We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a guarantee that we still can login to that server and become root no matter of what the other users will do.  Is that possible?
70598
So I was working and there was a directory that I was periodically changing to my user in  a root terminal so that I could open the files in text editors, but I accidentally pressed / instead of . and this was the command I put out:  chown -R emil.emil /   Then immediately panicked ^C and put in another command, as I thought I could always change back the files I needed to access:  chown -R root.root /   So now I can't do su from emil to even try to fix this, as I'm getting permission denied error. I'm on Ubuntu could someone tell me if there is a way I could fix this, without absolutely reinstalling the whole thing.  TIP  If you are trying to get root access, and are getting this permission denied error when using su try this command:  gksu gnome-terminal   It will prompt you for the root password and open a new root terminal for some reason this works and gives me root access, when su doesn't.
2993
I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.
120747
I am using 13.04 trying to edit or drag and drop files but since all the folders are owned by root and assigned to the group "root" I am not allow to do this.  I added my current username to the "root" group and still I am not able to edit.  I don't want to have to login as root to do this, or change all the folders group to something else.  What are my options.
5015
I changed permissions of a file (chmod g+w testfile) and running ls -l testfile gives:  -rwxrwxr-x 1 user1 user1 0 2011-01-24 20:36 testfile   I then added a user to that group ("/etc/group" has user1:x:1000:user2 line), but am failing to edit that file as user2. Why is this so?
68969
Despite the fact that I didn't run any chmod or chown commands, I seemed to have lost the ability to cd into some folders in my home directory. So I ran according to various answers on this forum since I have no clue about linux permissions:  sudo chmod -R 666 /home/rasmus/ sudo chown -c rasmus /home/rasmus/ sudo chown rasmus:rasmus /home/rasmus/ chmod 750 /home/rasmus/ sudo chown -R rasmus:rasmus /home/rasmus/ sudo chmod a+rx /home sudo chmod u+w /home   leaving my home dir in this state:  10:57:35: 8𝌆𝌆𝌆D:[~] ls -l total 52 drw-rw-rw- 2 rasmus rasmus 4096 Apr 15 10:43 catkin_ws/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Desktop/ drw-rw-rw- 3 rasmus rasmus 4096 Apr 15 09:31 Documents/ drw-rw-rw- 4 rasmus rasmus 4096 Apr 14 14:55 dotfiles/ drw-rw-rw- 3 rasmus rasmus 4096 Apr 14 15:27 Downloads/ -rw-rw-rw- 1 rasmus rasmus 8980 Apr 14 14:03 examples.desktop drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Music/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Pictures/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Public/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Templates/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 14:22 Videos/   Apparently, I can read the folders, but not cd into them:  10:58:54: 8𝌆𝌆𝌆D:[~] ls Desktop/ 10:58:58: 8𝌆𝌆𝌆D:[~] cd Desktop/ bash: cd: Desktop/: Permission denied   What do I need to do to fix this?
99605
[root@notebook ~]# grep root /etc/sudoers root    ALL=(ALL)   ALL   Question: Why does the root user need sudo permissions? I've seen it on different UNIX OSes. Can someone please explain this?
96276
I have tried:  sudo "some string" &gt;&gt; test.txt   But I am getting permission denied warning.  Can anyone help?
97400
Suppose I have two users Alice and Bob and a group GROUPNAME and a folder foo, both users are members of GROUPNAME (using Linux and ext3).   If I save as user Alice a file under foo, the permissions are: -rw-r--r-- Alice Alice. However, is it possible to achieve that every file saved under some subdirectory of foo has permissions -rwxrwx--- Alice GROUPNAME (i.e. owner Alice, group GROUPNAME)?