The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Proper way to set ownership of /

    Discussion in 'Linux Compatibility and Software' started by Apollo13, Jul 25, 2014.

  1. Apollo13

    Apollo13 100% 16:10 Screens

    Reputations:
    1,432
    Messages:
    2,578
    Likes Received:
    210
    Trophy Points:
    81
    I just installed Mint, and set up partitions as follows:

    / - 175 GB
    /swap - 5 GB
    /home - 20 GB

    I noticed when trying to install a Steam game that neither Steam nor I could create a folder in /. This was puzzling; I'd planned to install all my programs there, and just use /home for documents and whatnot. So I did some DuckDuckGo'ing, and found that I could take ownership of / with these commands:

    sudo chown -R Apollo13 /
    chmod -R 755 /

    The first one seems to have been sufficient, as I can now create folders and install games to /. Which is good, since that's where all my space is. But in the meantime I found this thread, which indicates I may have screwed up my system pretty badly. So far it's working, but I'm not sure it will after I reboot.

    So what I'm wondering is, did I do something I shouldn't have? And if not, how is one to go about gaining control of / to install programs and such there?

    I'm also wondering if I'm thinking about this in a non-Linux way. In Windows, if I were to partition my drive for performance, I'd put the system install on the first part, then have a partition for programs (which would probably be the largest), and then have the last, slowest partition for data. I more or less followed that pattern here, albeit combining system and programs. However, it seems that Linux wants to install programs to /home for some reason.

    I'm also curious if there good way to see how much free space I have on /home. In Nemo, at the Computer level, I can right-click on File System and see how much free space I have on / quite easily. I can also see how much space (free and used) I have on my NTFS drives very easily. However, my /home partition doesn't show up there. I can see it under My Computer on the left, but there's no option to see how much space is free. I can see how much is free in GParted, but that's somewhat out of the way and not very quick since it has to scan for partitions every time it starts.

    Sorry if these questions are noobish; I've never seriously tried to set up a Linux install for everyday use before.

    Edit: Uh-oh, Device Manager won't open. And now that I closed it, the Software Manager won't, either. This probably isn't a good sign :(.
     
  2. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    You use a program like sudo or su to act as the root user and gain write access to your whole filesystem.

    Never ever ever is there ever a reason to set ownership of /. You've essentially opened a huge security hole; this would be one rare instance where reinstalling the OS is the only viable solution.
     
    katalin_2003 and Jarhead like this.
  3. Apollo13

    Apollo13 100% 16:10 Screens

    Reputations:
    1,432
    Messages:
    2,578
    Likes Received:
    210
    Trophy Points:
    81
    Should I then run Steam as super user after reinstalling so I can install programs to my larger partition? Or would it be better to just only have one partition (other than swap)? I've read that it's beneficial to have user data on a separate partition, so it's still there if a re-install is needed, which is why I had two partitions in the first place. But I need to be able to install programs to the larger one if I do that.

    Edit: I should also note that I'm not really sure which partition software manager was installing programs to before I broke it.

    Edit 2: I'm also thinking maybe it will be more straightforward if I just keep all my documents on my NTFS partition where I already have them for Windows. That seemed to be working okay, and would result in less copying/file syncing.
     
  4. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    You don't need to run steam as root, all of the files are user accessible in the Steam folder under your home folder. I have an SSD and a HDD in my laptop, and for steam I let it install to its usual place and then moved the Steam folder to the HDD and created a symbolic link to it from my home folder. You can do the same with your setup if you choose multiple partitions.
     
  5. Apollo13

    Apollo13 100% 16:10 Screens

    Reputations:
    1,432
    Messages:
    2,578
    Likes Received:
    210
    Trophy Points:
    81
    That probably would've been a better way to do it. I hadn't thought of symlinks at the time, which is somewhat odd since they used to be the only way to install Steam files on a separate partition, even on Windows.

    As it was, I re-installed and went with just one partition, plus swap. Less efficient if I set up another distro, but so far Mint's working well enough so that's somewhat unlikely.
     
  6. kode-niner

    kode-niner Notebook Consultant

    Reputations:
    34
    Messages:
    279
    Likes Received:
    113
    Trophy Points:
    56
    Eh? you did a chown and chmod -R on your entire filesystem. Time for a re-install.
     
  7. helikaon

    helikaon Notebook Consultant

    Reputations:
    269
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    After doing this, your OS becomes nonstable and insecure.
    Reinstall your OS.
    Repartition disk and create extra partition - or better LVM based Logical Volume, so that if you need to install any custom SW, that is not included with your LInux distro, you install it to this place.
    If you screw there, it won't affect your whole system then.