Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    SOLVED Symlink from SD card to home dir without restrictions

    Support
    4
    7
    381
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • droid001
      droid001 last edited by

      How do you create a symlink from the sd card to home directory without restrictions? I attempted to do this with a common symlink command ln -s /media/sdcard/[hex-hash] /home/phablet/SDcard but need to fill in the root password if I use Files to navigate directories.
      The aim is to sync content with UBsync to the sd card which I'm not able to do at the moment. Syncing to the user directory works though.

      Aquarius m10 FHD

      AppLee 1 Reply Last reply Reply Quote 0
      • AppLee
        AppLee @droid001 last edited by

        Hi @droid001
        Ok, thanks for the clarification.
        So I guess the issue here is that your target folder is not in an "accessible" directory but probably right in the home directory.
        The accessible folders are Images, Documents, Videos, Music and maybe Downloads IIRC (sorry I cannot check at the moment).
        The the simlink should be in one of those folders in order to be visible and browseable by any app with the proper rights.

        Be aware that for example the music app is scanning the Music directory for new audio files as well as the galery app for new pictures in the Image directory.

        Hope it will help

        droid001 1 Reply Last reply Reply Quote 0
        • AppLee
          AppLee @droid001 last edited by

          @droid001
          There is no root password.
          But you can use sudo. The password for phablet is the PIN or passphrase you set up.

          droid001 1 Reply Last reply Reply Quote 0
          • droid001
            droid001 @AppLee last edited by

            @applee I seem not to have been too clear when stating the problem. I managed to create a symlink without problem. I need that link to be open to all users and apps, especially UBsync which will be using it when syncing content.
            Currently it seems like the symlink is restricted to the super user because the File Manager asks for the root password before displaying the symlink folder. The prompt is
            Restricted access. Authentication is required in order to see all the content of this folder.

            Aquarius m10 FHD

            AppLee L 2 Replies Last reply Reply Quote 0
            • A
              aimar last edited by aimar

              Hi @droid001, I have set up two symlinks between "OSM Scout Server" and the old "OSM Scout" apps and my SD card.
              In both I use the following command:

              ln -s "/path to folder in the SD card" "/path to folder in phone"
              

              I did not use "sudo". But I have neither set any password/PIN for the phone. BTW, I use a BQ4.5.
              I do not know why, "OSM Scout Server" reaches the data correctly through the symlink.
              However, "OSM Scout" does not.
              May it be due to restrictions within the app, that does not allow to access the SD card? Maybe "OSM Scout" and "UBSync" are not allowed?

              1 Reply Last reply Reply Quote 0
              • AppLee
                AppLee @droid001 last edited by

                Hi @droid001
                Ok, thanks for the clarification.
                So I guess the issue here is that your target folder is not in an "accessible" directory but probably right in the home directory.
                The accessible folders are Images, Documents, Videos, Music and maybe Downloads IIRC (sorry I cannot check at the moment).
                The the simlink should be in one of those folders in order to be visible and browseable by any app with the proper rights.

                Be aware that for example the music app is scanning the Music directory for new audio files as well as the galery app for new pictures in the Image directory.

                Hope it will help

                droid001 1 Reply Last reply Reply Quote 0
                • L
                  Luksus @droid001 last edited by

                  @droid001 you can still use the symlink in /home/phablet for syncing with ubsync, even if the the filebrowser app needs permission to show all folders there.

                  I use it that way and it works.

                  Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605, Pinephone, Moto Z2 Force

                  1 Reply Last reply Reply Quote 1
                  • droid001
                    droid001 @AppLee last edited by

                    @applee I managed to get the syncing done by placing a symlink in the Pictures folder. As stated above, placing a symlink in the root home folder didn't. At first there were some duplicates shown in the Gallery app but they were handled after a while and you could see the reshuffling going on. maybe it would be an idea to have a preference, like in SailfishOS, to automatically store pictures on the SD card if one is present?

                    Aquarius m10 FHD

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post