Announcement

Collapse
No announcement yet.

Applications unable to see/use non boot drive

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Applications unable to see/use non boot drive

    Hello, I recently made the move from Windows to Linux (Kubuntu). The move has been pretty painless and I have been able to resolve most questions or issues by searching around but, I have one thing that I'm either using the wrong key words for or it's just something that Linux guys know and don't think about. I have multiple SSDs installed on my PC (single boot). One drive is my boot (OS) drive and the other is meant for storing large files and backups of the OS drive. I can view both drives and their contents via the file manager (Dolphin) just fine, but when I am in an application and I want to save a file to the non-OS drive, it is not available. What I did find kept referring to the drive not being mounted, but it is available in Dolphin, would this not mean that it is already mounted? Any help or clarification on this would be great, as well as a solution to being able to open and save files on the secondary storage would be appreciated.

    Thanks in advance

    Also, I am able to cd to dirs on the secondary drive, does this not further support the idea that the storage is mounted?

    Thanks everyone. Got his figured out now.

    #2
    dolphin may show you the partition but won't necessarily be mounted until you try to access it.

    if you want to ensure that it's always mounted, go to configuration of Disks & Devices in the system tray... make sure the disk/partition you want to automounted has a check in the check box next to it.... from there on it should always be available to you or your applications launched from plasma (may not apply to applications launched via a command window).

    Comment


      #3
      Yes, if you can "see" (list) what's on a file system, then it's mounted. Now, lets talk about a thing called "permissions". What you are describing is a classic example of your user account not having permission to WRITE to the file system. This is one of the primary differences of Linux vs. Windows and why Linux is more safe from things like viruses.

      There are MANY tutorials on the web to teach you about this, but basically: Linux file systems set permissions as "read" "write" "execute" or "rwx". Folders (directories) and files all have a set of permissions and how the behave is slightly different for directories vs. files.

      Read seems obvious - your user can "see" the folders and files so you have read permission. This is the same for a directory as it is for a file.
      Write is a little different. With write permission you can edit a file. With a directory write permission, you can save or delete a file in the directory.
      Execute is very different. For a file, it means you can execute - "run" if you like - a file. f course it has to be a program or script for this to work. For a directory is just means you can "enter" the directory. I.e. act on the files it contains.

      The second way directory/file access is controlled is through "user" and "group". Each directory and file has and user and a group. The user is the "owner" of the file or directory. Sometimes that's you. Other times it's "root" (the system) or possibly some program or process is the owner. A "group" is a set of users joined together as a subset of users so they can - as a group - have some access to a group of files or directories.

      All of this pulls together this way: Three sets of permissions exist: User, Group, Others. If you long list (ls -l) files or directories in Konsole (or any other terminal) the permissions (three sets of three - one each for user, group, and others) and user:group show up like this:

      <permissions> <user> <group> <size,date and some other stuff> <name>

      So for example:

      -rwxrw-r-- bob users <size and date/time> filename

      The above means "filename" is owned by user bob and the file group is users. Bob has full read-write-execute (rwx - the first three letters after the initial dash) of the file but the Users group can only read or write (rw-. the second three letters in permissions) the file, but not execute, and others (anyone outside the users group who is also not bob) can only read the file (r--, the last three characters in permissions).

      A directory might look like

      drwxrw-r-- bob users <size and date/time> foldername

      Note the "d" at the beginning of the permissions to indicate it's a directory and not just a file.

      Read up on all this and you'll get it soon enough. Now to address the immediate problem: accessing your other storage devices.


      You can, by clicking on them in Dolphin (likely what you're doing now) see what's in them because the default permissions for Kubuntu allow that. But you can't write to them because that is also the default. There are several ways to change this but since these are fixed (internal) device vs. removable, the standard practice is to permanently define a mount in the /mnt/ directory by using the /etc/fstab file and create the permissions you want when they are mounted.

      The good new is KDE Partition Manager can do this for you. The steps are:
      1. Create a directory for each file system (a word on this to follow).
      2. Open KDE partition manager and edit the file system to "attach" it to a mount point.
      3. Mount the file system.
      One of the options you can check when adding the mount point in KDE Partition Manager is to check the "users can amount and unmount" which means you won't have to enter your password to mount these file systems.

      NOTE: I assume you used the EXT4 file system on the second drive. If so, you have to modify the file system to your user to access it freely. To do this, mount the file system somewhere ( aka <mountpoint> ) and then open Konsole and enter this:

      sudo chown 1000:1000 <mountpoint>

      So if you mount the second drive at "/mnt/storage" then it's: sudo chown 1000:1000 /mnt/storage
      From then on, you will be able to do whatever you want in that file system.
      The "1000" reference is the user:group numbers. The default for Kubuntu for the user created at installation is always 1000:1000

      To create new mount directories:
      Using Dolphin, navigate to the /mnt/folder and right-click on it and select "Open as Administrator". Then enter your password and the directory will open in a new window. You will now be able to create new directories under /mnt/

      A comment on the words we use:
      I believe, especially in a technical environment, that using the correct terms for things is very important so we clearly understand what we are saying to each other. When we talk about SSDs or Hard Drives or USB thumb drives, they are "devices". So are partitions because a partition is a section of a device (SSD, HD, etc.). To access these storage devices, we must create a file system on them (aka "format"). Then we "mount" (make available for access), it's a file system we mount, not a drive or partition because they are just hardware. It's the file system that we interact with at the user level. Why does this matter? Because file systems can span more than one device and commonly do. RAID, LVM, and some file systems like BTRFS can use many devices to contain a single file system. It's always best to speak properly when we're sharing information. Sermon over, lol



      Post back if you have trouble.

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        Yes, if you can "see" (list) what's on a file system, then it's mounted. Now, lets talk about a thing called "permissions". What you are describing is a classic example of your user account not having permission to WRITE to the file system. This is one of the primary differences of Linux vs. Windows and why Linux is more safe from things like viruses.

        There are MANY tutorials on the web to teach you about this, but basically: Linux file systems set permissions as "read" "write" "execute" or "rwx". Folders (directories) and files all have a set of permissions and how the behave is slightly different for directories vs. files.

        Read seems obvious - your user can "see" the folders and files so you have read permission. This is the same for a directory as it is for a file.
        Write is a little different. With write permission you can edit a file. With a directory write permission, you can save or delete a file in the directory.
        Execute is very different. For a file, it means you can execute - "run" if you like - a file. f course it has to be a program or script for this to work. For a directory is just means you can "enter" the directory. I.e. act on the files it contains.

        The second way directory/file access is controlled is through "user" and "group". Each directory and file has and user and a group. The user is the "owner" of the file or directory. Sometimes that's you. Other times it's "root" (the system) or possibly some program or process is the owner. A "group" is a set of users joined together as a subset of users so they can - as a group - have some access to a group of files or directories.

        All of this pulls together this way: Three sets of permissions exist: User, Group, Others. If you long list (ls -l) files or directories in Konsole (or any other terminal) the permissions (three sets of three - one each for user, group, and others) and user:group show up like this:

        <permissions> <user> <group> <size,date and some other stuff> <name>

        So for example:

        -rwxrw-r-- bob users <size and date/time> filename

        The above means "filename" is owned by user bob and the file group is users. Bob has full read-write-execute (rwx - the first three letters after the initial dash) of the file but the Users group can only read or write (rw-. the second three letters in permissions) the file, but not execute, and others (anyone outside the users group who is also not bob) can only read the file (r--, the last three characters in permissions).

        A directory might look like

        drwxrw-r-- bob users <size and date/time> foldername

        Note the "d" at the beginning of the permissions to indicate it's a directory and not just a file.

        Read up on all this and you'll get it soon enough. Now to address the immediate problem: accessing your other storage devices.


        You can, by clicking on them in Dolphin (likely what you're doing now) see what's in them because the default permissions for Kubuntu allow that. But you can't write to them because that is also the default. There are several ways to change this but since these are fixed (internal) device vs. removable, the standard practice is to permanently define a mount in the /mnt/ directory by using the /etc/fstab file and create the permissions you want when they are mounted.

        The good new is KDE Partition Manager can do this for you. The steps are:
        1. Create a directory for each file system (a word on this to follow).
        2. Open KDE partition manager and edit the file system to "attach" it to a mount point.
        3. Mount the file system.
        One of the options you can check when adding the mount point in KDE Partition Manager is to check the "users can amount and unmount" which means you won't have to enter your password to mount these file systems.

        NOTE: I assume you used the EXT4 file system on the second drive. If so, you have to modify the file system to your user to access it freely. To do this, mount the file system somewhere ( aka <mountpoint> ) and then open Konsole and enter this:

        sudo chown 1000:1000 <mountpoint>

        So if you mount the second drive at "/mnt/storage" then it's: sudo chown 1000:1000 /mnt/storage
        From then on, you will be able to do whatever you want in that file system.
        The "1000" reference is the user:group numbers. The default for Kubuntu for the user created at installation is always 1000:1000

        To create new mount directories:
        Using Dolphin, navigate to the /mnt/folder and right-click on it and select "Open as Administrator". Then enter your password and the directory will open in a new window. You will now be able to create new directories under /mnt/

        A comment on the words we use:
        I believe, especially in a technical environment, that using the correct terms for things is very important so we clearly understand what we are saying to each other. When we talk about SSDs or Hard Drives or USB thumb drives, they are "devices". So are partitions because a partition is a section of a device (SSD, HD, etc.). To access these storage devices, we must create a file system on them (aka "format"). Then we "mount" (make available for access), it's a file system we mount, not a drive or partition because they are just hardware. It's the file system that we interact with at the user level. Why does this matter? Because file systems can span more than one device and commonly do. RAID, LVM, and some file systems like BTRFS can use many devices to contain a single file system. It's always best to speak properly when we're sharing information. Sermon over, lol



        Post back if you have trouble.
        Sorry, I should have clarified. I have been supporting linux based appliances for over 10 years, so I understand permissions. That said, I have only ever used Linux via the CLI and never via a GUI or as my primary desktop. I don't think this is a permissions issue. For example:

        Code:
        james@kubuntu:/media/james/e1668cf6-c802-460e-90c2-6a034c78d168/Astrophotography/2024$ ls -al
        total 28896
        drwxrwxr-x 3 james james    4096 Jan  8 08:27  .
        drwxrwxr-x 7 james james    4096 Jan 28 10:21  ..
        -rwxr-xr-x 1 james james  931518 Jan  2  2024 '2024-01-02 Orion Nebula.jpg'
        -rwxr-xr-x 1 james james 1336889 Dec 31 17:05 '2024-01-08 Christmas Tree Cluster.jpg'
        -rwxr-xr-x 1 james james  950049 Jul  5  2024 '2024-01-12 Spider Nebula.jpg'
        -rwxr-xr-x 1 james james 1240350 Dec 31 17:05 '2024-01-18 Monkey Head Nebula.jpg'
        -rwxr-xr-x 1 james james 1744304 Mar 24  2024 "2024-01-20 Bode's Galaxy.jpg"
        -rwxr-xr-x 1 james james  742103 Dec 31 16:52 '2024-02-14 Caldwell 7.jpg'
        -rwxr-xr-x 1 james james  686654 Dec 31 17:12 '2024-02-14 NGC 4216.jpg'
        -rwxr-xr-x 1 james james 1028390 Feb 27  2024 '2024-02-23 M106.jpg'
        -rwxr-xr-x 1 james james 1190759 Dec 31 17:08 '2024-03-12 Barnard 13.jpg'
        -rwxr-xr-x 1 james james  163769 Dec 31 16:44 '2024-03-12 M51a.jpg'
        -rwxr-xr-x 1 james james  582575 Mar 14  2024 '2024-03-13 Caldwell 3.jpg'
        -rwxr-xr-x 1 james james 1187021 Dec 31 17:09 '2024-03-13 NGC 2247.jpg'
        -rwxr-xr-x 1 james james  794874 Dec 31 16:40 '2024-04-07 Pinwheel Galaxy.jpg'
        -rwxr-xr-x 1 james james 2063507 Sep 13 21:24 '2024-06-23 Pelican Nebula.jpg'
        -rwxr-xr-x 1 james james  413724 Dec 31 17:09 '2024-07-02 The Veil Nebula.jpg'
        -rwxr-xr-x 1 james james  235077 Aug 16 16:44 '2024-08-16 Crescent Nebula.jpg'
        -rwxr-xr-x 1 james james  961477 Dec 31 17:06 '2024-08-16 Elephant Trunk Nebula.jpg'
        -rwxr-xr-x 1 james james 1623921 Dec 31 17:06 '2024-08-29 Gamma Cygni Nebula.jpg'
        -rwxr-xr-x 1 james james 1740231 Dec 31 17:06 '2024-09-10 Ghost of Cassiopeia.jpg'
        -rwxr-xr-x 1 james james 1715286 Oct  3 11:09 '2024-10-03 LDN 1272.jpg'
        -rwxr-xr-x 1 james james 1099267 Oct  6 19:07 '2024-10-06 Andromeda Galaxy.jpg'
        -rwxr-xr-x 1 james james 1304128 Oct  8 11:04 '2024-10-08 Caldwell 9.jpg'
        -rwxr-xr-x 1 james james 1637183 Oct 11 12:53 '2024-10-11 Sh2 157.jpg'
        -rwxr-xr-x 1 james james   79963 Oct 11 18:22 '2024-10-11 Sh2 188.jpg'
        -rwxr-xr-x 1 james james  146959 Oct 22 08:49 '2024-10-22 Caldwell 23.jpg'
        -rwxr-xr-x 1 james james  123556 Oct 23 10:11 '2024-10-23 M74.jpg'
        -rwxr-xr-x 1 james james 1308465 Oct 31 15:37 '2024-10-31 LDN 1452.jpg'
        -rwxr-xr-x 1 james james  846117 Dec 31 17:10 '2024-11-13 Tadpole Nebula.jpg'
        -rwxr-xr-x 1 james james  267590 Dec  5 11:02 '2024-12-05 NGC 1530.jpg'
        -rwxr-xr-x 1 james james  519042 Dec 31 17:10 '2024-12-07  Spaghetti Nebula.jpg'
        -rwxr-xr-x 1 james james   17915 Dec 25 01:51 '2024-12-24 Jupiter.jpg'
        -rwxr-xr-x 1 james james    7430 Dec 25 02:01 '2024-12-24 Mars.jpg'
        -rwxr-xr-x 1 james james   11785 Dec 30 12:17 '2024-12-24 Saturn.jpg'
        -rwxr-xr-x 1 james james  812317 Dec 31 17:10 '2024-12-31 Sh2 202.jpg'
        drwxrwxr-x 2 james james    4096 Jan  8 08:27  reprocessed​
        These files are on the secondary storage. I am able to R/W/M/D/etc. In Dolphin, when right+click on the drive there is an option to "unmount" it, so that makes me think it is definitely mounted, along with the fact that as you said, I can view the FS. I am simply not used to using Linux in this way. As you can hopefully see from this screenshot, the drive just isn't listed in the file browser within apps. I'm guessing there must be a config file or system setting somewhere that needs to be checked. That's what I am trying to find or figure out.

        Actually, as I was putting this together, the path in the CLI got me thinking. It looks like I can actually get to it, it just doesn't show up as an option in the "left" panel along with "Computer" and my home dir. I can get to it by drilling down through "computer" and then go to the "media" dir. I knew it had to be something simple that I was either overlooking or overthinking. I'm guessing that if I follow your steps with the KDE PM, I should be able to create a mount point to dir that I already have there and this would add it to the "left side" menu. Thanks

        Comment


          #5
          Snap and Flatpack based applications are 'sandboxed' and by defualt will not have access to other drives

          This is well documented, though KDE doesn't have a gui interface for this.
          One can install the Snap store app, which can do this, or if using flatpaks, Flatseal can be used.

          or
          https://snapcraft.io/docs/interface-management
          https://linuxconfig.org/understandin...nd-permissions

          Comment


            #6
            Originally posted by claydoh View Post
            Snap and Flatpack based applications are 'sandboxed' and by defualt will not have access to other drives

            This is well documented, though KDE doesn't have a gui interface for this.
            One can install the Snap store app, which can do this, or if using flatpaks, Flatseal can be used.

            or
            https://snapcraft.io/docs/interface-management
            https://linuxconfig.org/understandin...nd-permissions
            Thanks. That's not the issue I was facing, which I have figured out now. Just needed to understand how this was working. Good to know if I ever decide to install Sanp or Flatpack apps.

            Comment

            Working...
            X