I accidentally ran a chmod 754 ./ when I was at the root directory on the server which runs Ubuntu 18.04.   Now I cannot use commands like sudo or pkexec, nor can I change anything. What should I do? Does it affect other user?
2210
I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?
14296
I am trying to do the following on my Mac (10.6.7):  sudo chown myusername:wheel ./entries   but Unix/Mac is returning "Operation not permitted". When I ls -lash the culprit file, it looks as follows:  8 -rwxrwxrwx   1 myusername  staff   394B Apr 26 23:26 entries   I've tried sudo and sudo su; nothing works. Any ideas what's up?  I'm trying to chmod files I've copied from my old Ubuntu box. Most of the files have successfully chmod'ed recursively; just this one is stuck and I don't understand why.
31056
I've accidentally run this command  sudo mv /* /applications/minced/   instead of   sudo mv ./* /applications/minced/   This is all that's left in the root directory  $ / applications/ dev/          proc/         run/          sys/          tmp/          I still have an active ssh connection to the server. I've tried calling mv, sudo and chmod... directly from /applications/minced/bin/ or /applications/minced/usr/bin/, but nothing works, though I can locate them there using path autocompletion.   $ /applications/minced/bin/ls -bash: /applications/minced/bin/ls: No such file or directory   I've read , but mounting the system under LiveCD is not an option for me since it's a VPS, not a physical machine. Any ideas?  Update  I figured out this is due to library linkage problems, so I did this   $ export LD_LIBRARY_PATH=/applications/minced/lib/x86_64-linux-gnu/ $ /applications/minced/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /applications/minced/bin/mv /applications/minced/* /   Obviously I ran into permission problems. Calling sudo with the linker throws this error  $ /applications/minced/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /applications/minced/usr/bin/sudo ... sudo: effective uid is not 0, is /applications/minced/usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?   As suggested by Barafu Albino, I've tried calling su with busybox (.../bin/busybox su -), but it throws su: must be suid to work properly. I guess this happens because su can't locate /etc/passwd and /etc/shadow. Seems like I've screwed up the system completely.
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?
101082
I have done this:  sudo chown -R myname /usr/   and now I can't use the sudo command because of this error:     sudo: must be setuid root   And as I read this means that the owner of this file /usr/bin/sudo is not the root. It's my user now because of the chown on the /usr folder.  On many forums and blogs people suggest to do this as root:  # chown root:root /usr/bin/sudo # chmod 4111 /usr/bin/sudo   ...but the problem with this is that I need to log in as a root, but I can't because If I write su in the terminal the password is wrong (actually I use the password what I added to my user):   $ su Password: su: Authentication failure   So can I get back the sudo command?  Edit: My Ubuntu is under Paralells on my Mac OS X.
804
When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N"&gt;/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N&gt; /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?
91005
I am having an access problem to some files and directories that I have tracked down to the group assigned to access them.    When I manually change the name of the group in the properties/permissions menu for a directory from the default setting (MyGroup) to www-data used by my Drupal Website, the directory error messages I get are gone.    There are a large number of files and directories that require this change.  If believe using chmod will change the owner which is set correctly and being new to Ubuntu, I am reluctant to experiment without a better understanding of how owner and groups work in the permissions settings.   What command changes the Group setting for a directory?
57841
I want to give non-sudo access to a non-root user on my machine, there is a user dns-manager, his only role is to run all the BIND commands(rndc, dnssec-keygen) etc.   Now everytime he has to run a command, he types,  sudo rndc reload   Is there a way I can get rid of this sudo, but only on a particular set of commands(and only for dns-manager)?
87910
How can I execute a file without giving myself execute permissions (with chmod u+x) for it?   If I try and tick the 'Allow executing file as program' checkmark, the checkmark is immediately removed.
102892
I just ran the following command in a directory with several files, some owned by root, some by a normal user. I got a strange message:  $ sudo chmod -rwx * chmod: example-file: new permissions are ----w----, not ---------   Why the heck does chmod refuse to clear all permissions, if a file had group write rights? What is the thought behind this behaviour?  And is there a way to force removing all permissions in one step, without having to execute sudo chmod g-w * afterwards?
1363
sorry fresh user. I installed about 9 days ago and had issues with Unity disappearing which took 5 days of headaches to fix. It never did fix, I reinstalled.   I set up Plex (media server) and while the server is running and can be accessed by external network devices, I can't add files. Plex says this is because of permissions. I have gone up and down the forums here and at Plex to get an answer. It seems everyone says   chmod -R 755 /media/My\ Book/Videos   will change permissions to allow the folder "Videos" on my external USB 2.0 NTFS 3TB Western Digital drive (which is mounted and accessible through the file manager) as well as every sub-directory and file contained therein to be accessible to user "Plex".  I have used file manager and as soon as you click to change permissions it changes right back. When I chmod with -c it tells me every file is changed (usually 600) to 755 as I commanded it to do. I did   ls -l   to verify and there is no change. (I also used ls -l to make sure I knew who the owner was and it is me (mvl1014). ls -al gives me the same info.)  I swear to god I tried to sudo it and after smashing my head against this keyboard for basically the entirety of my day, I tried it as root. I was scared shi-less but couldn't come up with anything else. sudo su to root and then chmod -R -c /media/My\ Book/Videos  Same result. -c told me every single file was changed and a check in Unity or in terminal confirmed not a darn thing changed.  Now it seems to me that even if that isn't the thing stopping Plex from working there is still a problem with this command not going through.  12.04LTS -- on gen 1 i7 (2.7 GHz I believe) with 6 GB ram   I've attempted to attach a screenshot but I'm told I need 10 reps to do so, which means I'm copy/pasting too.  Please excuse my obfuscation, but Lorem Ipsum seemed unnecessary. And I tried multiple ways to format this but it looks perfect every way and messed up each time in the preview below. (Ugh, I'm a mess.)  $ chmod -R -c 755 /media/My\ Book/Videos  .....  .....  .....  mode of `/media/My Book/Videos/xxxx/xxxx/xxxx.mkv' changed from 0600 (rw-------) to 0755 (rwxr-xr-x)    ls -al shows:  mvl1014@FX6800:/media/My Book/Videos$ ls -al   total 88  drwx------ 1 mvl1014 mvl1014     0 Aug 28 15:17 .   drwx------ 1 mvl1014 mvl1014 20480 Sep  3 14:29 ..  drwx------ 1 mvl1014 mvl1014  8192 Aug 28 15:18 xxxx drwx------ 1 mvl1014 mvl1014 49152 Aug 16 14:02 xxxx drwx------ 1 mvl1014 mvl1014  8192 Aug 27 21:36 xxxx drwx------ 1 mvl1014 mvl1014  4096 Jul 23 19:09 xxxx   I apologize if this has been asked. I looked through this place plus at all the suggested "Similar Questions". The closet thing I got to an answer , but running the provided code with my own UID didn't work either.
9561
I was trying to run chmod -R 777 ./ but ended up typing chmod -R 777 / and set 777 on my entire machine. What can go wrong? How can I fix it?
72456
I made a backup to an NTFS drive, and well, this backup really proved necessary. However, the NTFS drive messed up permissions. I'd like to restore them to normal w/o manually fixing each and every file.  One problem is that suddenly all my text files gained execute permissions, which is wrong ofc. So I tried:  sudo chmod -R a-x folder\ with\ restored\ backup/   But it is wrong as it removes the x permission from directories as well which makes them unreadable.  What is the correct command in this case?
26102
I have recently disabled  so that it now prompts me for a password every time.  And though this is good for security, it has caused one slight problem which I haven't been able to figure out a solution for, I am unable to run commands which go along the lines of:   sudo &lt;command&gt; &amp;   In the past I would have run a sudo command before that, it would have cached my password and allowed me to run sudo commands without prompt for the next few minutes, and thus it would allow me to run the command.  But when I run it now as there is no caching before hand and as it starts a new thread immediately and sudo doesn't even prompt me for a password, I am unable to run it in this way.  So unless I run sudo -i before it I am unable to run a command in this format which is becoming rather annoying. So I was wondering if there is any way to get around this and still run programs and commands in this way?  I am running Ubuntu GNOME 15.10 with GNOME 3.18, and specifically the program I want to run in this fashion is etherape if that makes any difference, but I would really like the solution to work for all programs and commands.
58188
I entered chmod -R 777 /usr/bin and now sudo is not working.  It says sudo must be setuid root.  Some advice online said to run chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo.  On entering chown root:root /usr/bin/sudo it shows an opened in readonly mode error.
58399
I am having Problems converting user rights. I want to assign the following rights to certain files/folders but dont know hat to translate them into a format which chmod will work with like chmod 755.  -rwxrwxrwx    will be?  And  drwxr-xr-x   will be?  And finally  -rw-r--r--   will be?
86897
How can I restrict a user on the SSH server to allow them only the privileges for ? i.e. So they cannot run commands even if they log in via SSH.  My Linux servers are Ubuntu 11.04 and OpenWrt.