Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: cannot delete files (read only file system)

  1. #1
    Join Date
    Sep 2007
    Beans
    707

    cannot delete files (read only file system)

    I have two files. They were originally owned by root. I changed that and now the files look like (from disks):
    drwxr-xr-x 3 greg greg 4096 Jan 10 12:51 snap
    drwxr-xr-x 17 greg greg 4096 Jan 10 10:45 snapd


    I tried to remount them but were told they were busy. I have no idea what they are doing and
    When I try and delete them, using sudo or su, I am told that they are in a read-only file system
    I also failed to change the ownership of those files that are read only

    I finally figured out how to get rid of the files and then I did a search for 'snap' and 'snapd' it seems that there are a LOT of files (snap or 'snapd' included in name. I think these were already on my machine so I won't delete unless somebody tells me to do that.

    All this occurred when I decided to by a cheap endoscope and see if it would run on my machine - BAD mistake! I think, however, that I have stopped and deleted all the offending machine.

    Now, I wonder if anybody could tell me if I am in trouble. As far as I know my machine is running without a problem but I get a bit antsy when I do something obviously not good <G>
    AMD A8-7650K Radeon R7, 10 Compute Cores 4C+6G
    15338MB
    System Ubuntu 18.04.1 LTS 3840x2160 pixels
    AMD KAVERI (DRM 2.50.0 / 4.15.0-33-generic, LLVM 6.0.0)

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    14,566
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: cannot delete files (read only file system)

    The file system is read-only. Nothing on it can be changed. That's sorta the point of a read-only file system.

    This happens for a few reasons. If you didn't do it on purpose, then those reasons usually aren't good. Check the log files, see what shows up as errors or warnings. I assume you rebooted it and the read-only has come back. I've seen it for a bad sata cable or failing disk controller.

    Would be smart to check the SMART tests for the HDD too.

    The OS moves a file system from read-write to read-only when it sees bad things are possible, like data corruption.

  3. #3
    Join Date
    Sep 2007
    Beans
    707

    Re: cannot delete files (read only file system)

    I was able to deal with it. I did it with sudo nautilus and then changed ownership, and permissions, of all the files involved. Then I had to move them out of the trash. Those that were running I killed. Took me a while but, finally, it got done. I was a bit of a pain <G>
    AMD A8-7650K Radeon R7, 10 Compute Cores 4C+6G
    15338MB
    System Ubuntu 18.04.1 LTS 3840x2160 pixels
    AMD KAVERI (DRM 2.50.0 / 4.15.0-33-generic, LLVM 6.0.0)

  4. #4
    Join Date
    Dec 2017
    Beans
    610

    Re: cannot delete files (read only file system)

    Not a good idea to " sudo nautilus", better to "sudo -H nautilus".

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    14,566
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: cannot delete files (read only file system)

    Quote Originally Posted by cruzer001 View Post
    Not a good idea to " sudo nautilus", better to "sudo -H nautilus".
    Yep. May have made some config files owned by root, which will cause issues doing that.

  6. #6
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: cannot delete files (read only file system)

    Quote Originally Posted by cruzer001 View Post
    Not a good idea to " sudo nautilus"…
    ↑↑↑+1

    The "official" way to invoke root nautilus is to install the following:
    Code:
    sudo apt install nautilus-admin
    …which installs the Policy Kits for both nautilus and gedit. This will give you root nautilus and also root gedit. It is invoked with:
    Code:
    pkexec nautilus
    …or:
    Code:
    pkexec gedit
    Alternatively, you now get a new right-click menu option in regular nautilus which allows you to open a root nautilus or root gedit.

    A word to the wise: I've found that it is not a good idea to use any GUI app as root even if this functionality can be enabled. This is because I have run into problems mistaking a root file manager which was carelessly left open for a regular one and causing myself immense grief. Therefore, I find it better to monkey around with root only in the command line. If new users want some pseudo-graphical hand-holding, then consider Midnight Commander in root mode:
    Code:
    sudo apt install mc
    Code:
    sudo mc

  7. #7
    Join Date
    Dec 2017
    Beans
    610

    Re: cannot delete files (read only file system)

    want some pseudo-graphical hand-holding, then consider Midnight Commander in root mode
    I'll drink to that; even has dual pane

  8. #8
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: cannot delete files (read only file system)

    You can run GUI programs in 17.10 with Xorg with elevated permissions with

    Code:
    sudo -H gui-program
    But it does not work in Wayland, which is designed to only allow text mode programs with elevated permissions (for security reasons). In other words, the developers of Wayland (and many other people too) think that it is a good idea to use text mode programs for tasks that need elevated permissions.

    There is a workaround, that works in many cases, for example with Nautilus and Gedit,

    Code:
    xhost +si:localuser:root
    sudo -H gui-program
    This is described with more details at this link,

    Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?

  9. #9
    Join Date
    Dec 2017
    Beans
    610

    Re: cannot delete files (read only file system)

    Thats good info on wayland. I will be taking the dive in a few months. Thanks

  10. #10
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: cannot delete files (read only file system)

    Quote Originally Posted by sudodus View Post
    …There is a workaround, that works in many cases…This is described with more details at this link…
    Thank you so much for this sudodus.

    At the risk of digressing a little, I'm of two minds about the direction that Wayland devs have chosen:

    1. This forum is filled with hundreds, maybe thousands, of identical recurring problems from new users who bork their systems because they did a:
      Code:
      sudo nautilus
      A big part of me gets why the devs said: "we will not tolerate any more monkeying around with sudo and graphical apps." As helpers on these forums, it will make our lives a lot easier not having to dig unsuspecting victims out of such messes.
    2. However, the bigger part of me is really irritated that we are prohibited from doing some really useful things. gparted is a good example of a highly useful app that will be nerfed. There's no other app like it, and even though parted is very powerful, this is one area where a graphical representation is far superior to the numerical obscurity of the CLI.

    Thanks for giving me gparted back.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •