I am using Ubuntu 18.04 and I wanted to access a directory which only root could read or write to. I read somewhere I could launch nautilus as root with this command: sudo -H nautilus which opened a file explorer which still didn't have root permissions. This is the error that came up in the console:  $ sudo -H nautilus Gtk-Message: 11:26:52.751: GtkDialog mapped without a transient parent. This is discouraged.  (nautilus:3453): Gtk-CRITICAL **: 11:26:52.752: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed  ** (nautilus:3453): CRITICAL **: 11:26:52.752: setup_side_pane_width: assertion 'priv-&gt;sidebar != NULL' failed  ** (nautilus:3453): WARNING **: 11:26:52.925: Unable to get contents of the bookmarks file: Error opening file /root/.gtk-bookmarks: No such file or directory  ** (nautilus:3453): WARNING **: 11:26:52.925: Unable to get contents of the bookmarks file: Error opening file /root/.gtk-bookmarks: No such file or directory   I then found out I could reach the directory just by directing a normal file explorer to admin://&lt;absolute path of directory&gt;. That did it, but now every time I log into my account there's a popup showing up after a couple of minutes saying System problem detected. I am guessing it has something to do with that sudo -H nautilus I ran. I didn't reboot in between the two solutions so I can't really say.  PS: That directory I wanted to access was one created by an unfinished photorec I did to recover a file. For some reason I wasn't able to delete that directory, named recup_dir.1, because I didn't have permission.
102161
I'd like to know if there a way to be granted root rights while using Nautilus 2.30 ?   For example I'd like to move some old folders of long unused users from the home directory - remains of previous distros (Debian).   Of course I can open a terminal, but I want to know if it is possible to do that with a mouse in Nautilus.
74583
I have already read the question about  but this is not what I want, I want to be able to click on the file in Dash or in Nautilus and be able to open it with the specified app.  For example I have this case right now:  When I click on an EXE file it does not get executed by Wine, instead I get the following:    If I try to look for Wine in the Open With context menu option it is there. I am fine executing it from there the first time, but then the following times Wine does not appears selected in the main Context menu:    I then went to Properties to the Open With Tab to look for Wine. It was not in the Default apps nor was it in the Recommended ones when I clicked and search on Show other applications    This is not limited to EXE extensions. It also has happened with MKV files, MP4 files, JPG, PNG, MP3 and even SVG and CSS. So instead of trying to find a way of solving it for one, I want a way that can be done to any type of extension that can:   Make the app the default of that extension Appear on the context menu in Nautilus when I right click on the file Appears on the "Open With" tab on the Property window of the file Correctly executes the specified app when I click on the file with Dash   This might sound like it should be common sense for an app to execute the file but it does not always work like that. So for the cases where it actually does not work, how to fix it. A reset of the extension?, An update of the files that can open said extension?, an addition of the app via a command line or GUI tool?
84453
I am trying to delete files in Nautilus and every time I try to delete one it always gives me this message:     Cannot move file to trash, do you want to delete immediately?   Then it gives me several questions. All I want is that when I press Delete in the keyboard, it sends it automatically to the trash can. Not to ask me every time.  The problem relates to NTFS partitions, external drives but also include Linux filesystems.  What are the reasons for nautilus beeing not able to move to trash?
97548
Objective : Run a program as root (C++ binary). The same as :   And :   ./a.out output:  E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? psurana  //output for "whoami" Look below for the code.   ls -l output:  -rwsrwxr-x 1 root    root    46136 Jun  7 20:13 a.out  The Code :   #include &lt;string&gt; #include &lt;stdlib.h&gt; int main(int argc, char *argv[]){         std::string input = "apt-get install " + std::string(argv[1]);         system(input.c_str());         system("whoami");         return 0; }   Details: : compiled the program and then did chown root:root a.out &amp;&amp; chmod u+s a.out. Please look above for ls -l output.  I still do not get the root privileges and the output for system("whoami") in the code is my own username on the machine.  Reading the two linked questions did not yield me anywhere. :(. both the creator and the owner of the file are root. The setuid bit is set, so it should work. The filesystem is not external either, it is my own machine. How can I make this work?
81024
I have the following file:  ---------- 1 Steve Steve 341 2017-12-21 01:51 myFile.txt   I switched the user to root in the terminal, and I have noticed the following behaviors:   I can read this file and write to it. I can't execute this file. If I set the x bit in the user permissions (---x------) or the group permissions (------x---) or the others permissions (---------x) of the file, then I would be able to execute this file.   Can anyone explain to me or point me to a tutorial that explains all of the rules that apply when the root user is dealing with files and directories?
75470
I accidentally moved all folders from root to a subfolder. (/bin, /etc, /home, /lib, /usr... all moved) The only ones that were not moved, since they were in use, are  /bak, /boot, /dev, /proc, /sys.  Now, any command that I try to execute will simply not happen. I constantly get "No such file or directory".  I am connected through ssh and through ftp, but I cannot move files through ftp, as direct SU login is disabled. I also have access to the actual server if I need to do something directly from there.  I'm assuming I would need to edit a configuration file in order to tell it where to find the /bin folder and that would help me get access again, but I don't know which file that would be or how to do it (since I can't even run chmod to change permissions).  Is there any way out of this other than re-installing?  I am working on an old version of CentOS.  I'm extremely new to the world of Linux, hence this action and the question...
99924
I'm currently working with Atom, and sometimes I want to open a terminal on the directory my working file is. To do this, I usually have to open the folder in nautilus (right clicking the file in atom) and then I open a terminal on that directory from nautilus (right click).  I wonder if there is a way to open the terminal in the file directory without having to open nautilus first.
64801
When I right-click the desktop icon for my USB drive or SD card I have the choice to "Eject" or "Safely Remove Drive":    In the Tree side pane in Nautilus, I can either "Unmount" or "Eject":    The Places side pane in Nautilus has some kind of eject icon:    What do all of these do?  Specifics I've been wondering about include:   What happens when a drive has multiple partitions mounted? Under what conditions is a prompt to empty the trash displayed? Do any of these result in a state in which the drive cannot be mounted again without first being physically reconnected?
2108
When you attempt to modify a file without having write permissions on it, you get an error:  &gt; touch /tmp/foo &amp;&amp; sudo chown root /tmp/foo &gt; echo test &gt; /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  &gt; sudo echo test &gt; /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  &gt; sudo su # echo test &gt; /tmp/foo
106969
In Ubuntu 18.04, I can create a file as one user in /tmp, and write to it as user root (despite the sticky bit being set on /tmp). In Ubuntu 20.04, I get a Permission Denied error as user root. Ubuntu 18.04: # As user &quot;ubuntu&quot;: touch /tmp/tmplock  # As user &quot;root&quot;: echo &quot;foo&quot; &gt; /tmp/tmplock  cat /tmp/tmplock # Outputs &quot;foo&quot;  ls -lah /tmp drwxrwxrwt 32 root   root    20K Jun 16 18:36 . -rw-rw-r--  1 ubuntu ubuntu    4 Jun 16 18:36 tmplock  Ubuntu 20.04: # As user &quot;ubuntu&quot;: touch /tmp/tmplock  # As user &quot;root&quot;: echo &quot;foo&quot; &gt; /tmp/tmplock # Outputs: bash: /tmp/tmplock: Permission denied  ls -lah /tmp drwxrwxrwt 12 root   root   4.0K Jun 16 18:15 . -rw-rw-r--  1 ubuntu ubuntu    0 Jun 16 18:14 tmplock  I can't find any information on if this is related to the sticky bit, or an underlying Linux kernel change, or anything. Does anyone know what can explain the change in behavior?
123879
There is some behavior I can't understand in the Unity Desktop.   Open nautilus via. clicking in the launcher onto the home-button Navigate to for example the windows-partition in nautilus Minimize nautilus Click on nautilus in the launcher doesn't open the nautilus with windows-partition, instead it opens a new window with the home folder.   Is there a workaround for this strange behavior?  Regards, Arthur
112131
When typing either of the commands nautilus . or xdg-open . into terminal, they execute correctly, but with a warning:  Nautilus-Share-Message: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)   As I say, it opens the file manager correctly and I can detect no further problems. There are several instances of users experiencing this message in other questions , but each of the questions either addresses a side-issue I'm not experiencing, or simply goes unanswered.    What does this message mean, and can I do anything to prevent it?
87005
Please could you tell me where can I find the File Manager Preferences in Ubuntu ... (now for 16:04 LTS).  The menu bar has disappeared from Nautilus, as also have the resize handles and the top-bar right-click menu (except for 'Close').  The window gets a little smaller every time I open it, it's gradually disappearing and I can't presently correct it.  I'm using Gnome not Unity, so the fixes for unity don't work.  I would have preferred to add these observations as comments, but I still have too few reputations to do that, so have to ask a new copy of the same question instead.
89505
I am new to Ubuntu so please forgive my inexperience.  I am running Ubuntu Desktop 16.04.1 and I am set up as an administrator, I am the only user so I believe therefore I should be a root user.  However, when I try to copy a file from the root /var/www/html and paste it in /var/www/ directory, using any file management software (i.e. File manager, Files, Dolphin, etc.), I get the error message: Access denied. Could not write to.  Why can I not write to these directories?    Could this be because I have the automatic login option turned on?
76814
Can someone explain to me the following?  $ ls -ld /temp/sit/build/ dr-xr-s--- 3 asdf qwer 4096 Jan 31  2012 /temp/sit/build/  $ ls -ld /temp/sit/build/* ls: /temp/sit/build/*: Permission denied   So apprently, I can't use the asterisk here. I've tried it with a sudo command and I get a "no such file" error rather than "permission denied"...  sudo ls -l /temp/sit/build/* ls: /temp/sit/build/batch*: No such file or directory   but it finally works if I don't use the *  sudo ls -l /temp/sit/build/ total 4 dr-xr-s--- 11 asdf qwer 4096 Oct  3 23:31 file
26841
After searching for a file in Nautilus, how can I open its parent folder?
15550
When I send a file to the Trash using the delete keyboard button, a popup appears at the top of the nautilus window, saying that the file has been removed, and showing a button to undo the operation.  I find this extremely annoying, because I can't click anything below that popup, and I have to wait until it disappears. Besides, I can undo the deletion with just a ctrl+Z, so I don't find it at all useful.  How can I get rid of this notification? I've looked in the preferences but there's nothing about this.  I have Ubuntu 18.04 and my GNOME version is 3.28.2.